7 lines
104 KiB
JavaScript
7 lines
104 KiB
JavaScript
|
(function(){var s=function(t,M){return function(){return M||t((M={exports:{}}).exports,M),M.exports}};var W=s(function(Ft,L){L.exports=window.jQuery});var G=s(function(Y){(function(t){typeof define=="function"&&define.amd?define(["jquery"],t):t(typeof Y=="object"?W():jQuery)})(function(t,M){function N(){return new Date(Date.UTC.apply(Date,arguments))}function O(){var a=new Date;return N(a.getFullYear(),a.getMonth(),a.getDate())}function V(a,e){return a.getUTCFullYear()===e.getUTCFullYear()&&a.getUTCMonth()===e.getUTCMonth()&&a.getUTCDate()===e.getUTCDate()}function z(a,e){return function(){return e!==M&&t.fn.datepicker.deprecated(e),this[a].apply(this,arguments)}}function vt(a){return a&&!isNaN(a.getTime())}var I=function(){var a={get:function(e){return this.slice(e)[0]},contains:function(e){for(var i=e&&e.valueOf(),r=0,n=this.length;r<n;r++)if(0<=this[r].valueOf()-i&&this[r].valueOf()-i<864e5)return r;return-1},remove:function(e){this.splice(e,1)},replace:function(e){!e||(t.isArray(e)||(e=[e]),this.clear(),this.push.apply(this,e))},clear:function(){this.length=0},copy:function(){var e=new I;return e.replace(this),e}};return function(){var e=[];return e.push.apply(e,arguments),t.extend(e,a),e}}(),J=function(a,e){t.data(a,"datepicker",this),this._events=[],this._secondaryEvents=[],this._process_options(e),this.dates=new I,this.viewDate=this.o.defaultViewDate,this.focusDate=null,this.element=t(a),this.isInput=this.element.is("input"),this.inputField=this.isInput?this.element:this.element.find("input"),this.component=this.element.hasClass("date")?this.element.find(".add-on, .input-group-addon, .input-group-append, .input-group-prepend, .btn"):!1,this.component&&this.component.length===0&&(this.component=!1),this.isInline=!this.component&&this.element.is("div"),this.picker=t(l.template),this._check_template(this.o.templates.leftArrow)&&this.picker.find(".prev").html(this.o.templates.leftArrow),this._check_template(this.o.templates.rightArrow)&&this.picker.find(".next").html(this.o.templates.rightArrow),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),this.o.calendarWeeks&&this.picker.find(".datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",function(i,r){return Number(r)+1}),this._process_options({startDate:this._o.startDate,endDate:this._o.endDate,daysOfWeekDisabled:this.o.daysOfWeekDisabled,daysOfWeekHighlighted:this.o.daysOfWeekHighlighted,datesDisabled:this.o.datesDisabled}),this._allow_update=!1,this.setViewMode(this.o.startView),this._allow_update=!0,this.fillDow(),this.fillMonths(),this.update(),this.isInline&&this.show()};J.prototype={constructor:J,_resolveViewName:function(a){return t.each(l.viewModes,function(e,i){if(a===e||t.inArray(a,i.names)!==-1)return a=e,!1}),a},_resolveDaysOfWeek:function(a){return t.isArray(a)||(a=a.split(/[,\s]*/)),t.map(a,Number)},_check_template:function(a){try{if(a===M||a==="")return!1;if((a.match(/[<>]/g)||[]).length<=0)return!0;var e=t(a);return e.length>0}catch(i){return!1}},_process_options:function(a){this._o=t.extend({},this._o,a);var e=this.o=t.extend({},this._o),i=e.language;S[i]||(i=i.split("-")[0],S[i]||(i=U.language)),e.language=i,e.startView=this._resolveViewName(e.startView),e.minViewMode=this._resolveViewName(e.minViewMode),e.maxViewMode=this._resolveViewName(e.maxViewMode),e.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,e.startView)),e.multidate!==!0&&(e.multidate=Number(e.multidate)||!1,e.multidate!==!1&&(e.multidate=Math.max(0,e.multidate))),e.multidateSeparator=String(e.multidateSeparator),e.weekStart%=7,e.weekEnd=(e.weekStart+6)%7;var r=l.parseFormat(e.format);e.startDate!==-1/0&&(e.startDate?e.startDate instanceof Date?e.startDate=this._local_to_utc(this._zero_time(e.startDate)):e.startDate=l.parseDate(e.startDate,r,e.language,e.assumeNearbyYear):e.startDate=-1/0),e.endDate!==1/0&&(e.endDate?e.endDate instanceof Date
|
||
|
/*!
|
||
|
* Datepicker for Bootstrap v1.9.0 (https://github.com/uxsolutions/bootstrap-datepicker)
|
||
|
*
|
||
|
* Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
||
|
*/
|