bnbweb/back/assets/js/daterangepicker.min.js

9 lines
32 KiB
JavaScript
Raw Normal View History

2022-11-14 15:49:28 +00:00
/**
* @version: 2.1.17
* @author: Dan Grossman http://www.dangrossman.info/
* @copyright: Copyright (c) 2012-2015 Dan Grossman. All rights reserved.
* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
* @website: https://www.improvely.com/
*/
!function(a,b){if("function"==typeof define&&define.amd)define(["moment","jquery","exports"],function(c,d,e){a.daterangepicker=b(a,e,c,d)});else if("undefined"!=typeof exports){var c=require("moment"),d="undefined"!=typeof window?window.jQuery:void 0;if(!d)try{d=require("jquery"),d.fn||(d.fn={})}catch(e){if(!d)throw new Error("jQuery dependency not found")}b(a,exports,c,d)}else a.daterangepicker=b(a,{},a.moment||moment,a.jQuery||a.Zepto||a.ender||a.$)}(this||{},function(a,b,c,d){var e=function(a,b,e){if(this.parentEl="body",this.element=d(a),this.startDate=c().startOf("day"),this.endDate=c().endOf("day"),this.minDate=!1,this.maxDate=!1,this.dateLimit=!1,this.autoApply=!1,this.singleDatePicker=!1,this.showDropdowns=!1,this.showWeekNumbers=!1,this.timePicker=!1,this.timePicker24Hour=!1,this.timePickerIncrement=1,this.timePickerSeconds=!1,this.linkedCalendars=!0,this.autoUpdateInput=!0,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.drops="down",this.element.hasClass("dropup")&&(this.drops="up"),this.buttonClasses="btn btn-sm",this.applyClass="btn-success",this.cancelClass="btn-default",this.locale={format:"MM/DD/YYYY",separator:" - ",applyLabel:"Apply",cancelLabel:"Cancel",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:c.weekdaysMin(),monthNames:c.monthsShort(),firstDay:c.localeData().firstDayOfWeek()},this.callback=function(){},this.isShowing=!1,this.leftCalendar={},this.rightCalendar={},"object"==typeof b&&null!==b||(b={}),b=d.extend(this.element.data(),b),"string"!=typeof b.template&&(b.template='<div class="daterangepicker dropdown-menu"><div class="calendar left"><div class="daterangepicker_input"><input class="input-mini" type="text" name="daterangepicker_start" value="" /><i class="fa fa-calendar glyphicon glyphicon-calendar"></i><div class="calendar-time"><div></div><i class="fa fa-clock-o glyphicon glyphicon-time"></i></div></div><div class="calendar-table"></div></div><div class="calendar right"><div class="daterangepicker_input"><input class="input-mini" type="text" name="daterangepicker_end" value="" /><i class="fa fa-calendar glyphicon glyphicon-calendar"></i><div class="calendar-time"><div></div><i class="fa fa-clock-o glyphicon glyphicon-time"></i></div></div><div class="calendar-table"></div></div><div class="ranges"><div class="range_inputs"><button class="applyBtn" disabled="disabled" type="button"></button> <button class="cancelBtn" type="button"></button></div></div></div>'),this.parentEl=d(b.parentEl&&d(b.parentEl).length?b.parentEl:this.parentEl),this.container=d(b.template).appendTo(this.parentEl),"object"==typeof b.locale&&("string"==typeof b.locale.format&&(this.locale.format=b.locale.format),"string"==typeof b.locale.separator&&(this.locale.separator=b.locale.separator),"object"==typeof b.locale.daysOfWeek&&(this.locale.daysOfWeek=b.locale.daysOfWeek.slice()),"object"==typeof b.locale.monthNames&&(this.locale.monthNames=b.locale.monthNames.slice()),"number"==typeof b.locale.firstDay&&(this.locale.firstDay=b.locale.firstDay),"string"==typeof b.locale.applyLabel&&(this.locale.applyLabel=b.locale.applyLabel),"string"==typeof b.locale.cancelLabel&&(this.locale.cancelLabel=b.locale.cancelLabel),"string"==typeof b.locale.weekLabel&&(this.locale.weekLabel=b.locale.weekLabel),"string"==typeof b.locale.customRangeLabel&&(this.locale.customRangeLabel=b.locale.customRangeLabel)),"string"==typeof b.startDate&&(this.startDate=c(b.startDate,this.locale.format)),"string"==typeof b.endDate&&(this.endDate=c(b.endDate,this.locale.format)),"string"==typeof b.minDate&&(this.minDate=c(b.minDate,this.locale.format)),"string"==typeof b.maxDate&&(this.maxDate=c(b.maxDate,this.locale.format)),"object"==typeof b.startDate&&(this.startDate=c(b.startDate)),"object"==typeof b.endDate&&(this.endDate=c(b.endDate)),"object"==typeof b.minDate&&(this.minDate=c(b.minDate)),"object"==typeof b.maxDate&&(this.maxDate=c(b.maxDate)),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.e
d.fn.daterangepicker=function(a,b){return this.each(function(){var c=d(this);c.data("daterangepicker")&&c.data("daterangepicker").remove(),c.data("daterangepicker",new e(c,a,b))}),this},e});