diff --git a/CHANGE.md b/CHANGE.md index 7d3033e..8ab419e 100755 --- a/CHANGE.md +++ b/CHANGE.md @@ -3,9 +3,10 @@ Change Log: `yii2-widget-datetimepicker` ## Version 1.4.4 (_under development_) -**Date:** 19-Jan-2017 +**Date:** 19-Mar-2017 -- (bug #70, bug #71): Rollback release of bootstrap-datetimepicker plugin. +- (bug #70, #71): Rollback release of bootstrap-datetimepicker plugin. +- (enh #66, #68, #72, #73, #74, #75): Timezone defaulting enhancements and bug fixes for datetimepicker. ## Version 1.4.3 diff --git a/DateTimePicker.php b/DateTimePicker.php index 3a8fab8..c91e416 100755 --- a/DateTimePicker.php +++ b/DateTimePicker.php @@ -4,7 +4,7 @@ * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2017 * @package yii2-widgets * @subpackage yii2-widget-datetimepicker - * @version 1.4.3 + * @version 1.4.4 */ namespace kartik\datetime; @@ -50,15 +50,22 @@ class DateTimePicker extends InputWidget * Datetimepicker rendered as a button */ const TYPE_BUTTON = 5; + /** * @var string the markup type of widget markup must be one of the TYPE constants. */ public $type = self::TYPE_COMPONENT_PREPEND; + /** * @var string The size of the input - 'lg', 'md', 'sm', 'xs' */ public $size; + /** + * @var boolean whether to auto default timezone if not set. + */ + public $autoDefaultTimezone = true; + /** * @var array the HTML attributes for the button that is rendered for [[DateTimePicker::TYPE_BUTTON]]. * Defaults to `['class'=>'btn btn-default']`. The following special options are recognized: @@ -127,6 +134,9 @@ public function init() "Invalid value for the property 'type'. Must be an integer between 1 and 5." ); } + if ($this->autoDefaultTimezone && empty($this->pluginOptions['timezone']) && !empty(Yii::$app->timezone)) { + $this->pluginOptions['timezone'] = Yii::$app->timezone; + } $dir = Yii::getAlias('@vendor/kartik-v/yii2-widget-datetimepicker'); $this->initI18N($dir); $s = DIRECTORY_SEPARATOR; diff --git a/DateTimePickerAsset.php b/DateTimePickerAsset.php index ce874f4..f591544 100755 --- a/DateTimePickerAsset.php +++ b/DateTimePickerAsset.php @@ -4,7 +4,7 @@ * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2017 * @package yii2-widgets * @subpackage yii2-widget-datetimepicker - * @version 1.4.3 + * @version 1.4.4 */ namespace kartik\datetime; diff --git a/assets/css/datetimepicker-kv.css b/assets/css/datetimepicker-kv.css index bfca9ae..0cb1c7d 100755 --- a/assets/css/datetimepicker-kv.css +++ b/assets/css/datetimepicker-kv.css @@ -2,7 +2,7 @@ * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2017 * @package yii2-widgets * @subpackage yii2-widget-datepicker - * @version 1.4.3 + * @version 1.4.4 * * Custom styling for DateTimepicker * Built for Yii Framework 2.0 diff --git a/assets/css/datetimepicker-kv.min.css b/assets/css/datetimepicker-kv.min.css index 9631661..8d257d9 100755 --- a/assets/css/datetimepicker-kv.min.css +++ b/assets/css/datetimepicker-kv.min.css @@ -2,7 +2,7 @@ * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2017 * @package yii2-widgets * @subpackage yii2-widget-datepicker - * @version 1.4.3 + * @version 1.4.4 * * Custom styling for DateTimepicker * Built for Yii Framework 2.0 diff --git a/assets/js/bootstrap-datetimepicker.js b/assets/js/bootstrap-datetimepicker.js index 9f0bb79..1c9e151 100755 --- a/assets/js/bootstrap-datetimepicker.js +++ b/assets/js/bootstrap-datetimepicker.js @@ -1,4 +1,4 @@ -/* ========================================================= +/* ========================================================= * bootstrap-datetimepicker.js * ========================================================= * Copyright 2012 Stefan Petre @@ -9,6 +9,7 @@ * Improvements by Kenneth Henderick * Improvements by CuGBabyBeaR * Improvements by Christian Vaas + * Improvements by Kartik Visweswaran, Krajee.com, 2017 * * Project URL : http://www.malot.fr/bootstrap-datetimepicker * @@ -72,6 +73,19 @@ return UTCDate(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate(), today.getUTCHours(), today.getUTCMinutes(), today.getUTCSeconds(), 0); } + // Added by Kartik 20-Mar-2017 + var lPad = function (n) { + return n === '' ? '' : (n < 10 ? '0' + n : '' + n); + }; + + // Added by Kartik 20-Mar-2017 + var getTzName = function (d) { + var today = d || new Date(), offset = today.getTimezoneOffset(), o = Math.abs(offset), + h = offset ? Math.floor(o / 60) : '', m = offset ? o % 60 : '', + tzPrefix = offset ? (offset > 0 ? 'GMT-' : 'GMT+') : 'GMT'; + return tzPrefix + lPad(h) + lPad(m); + }; + // Picker object var Datetimepicker = function (element, options) { var that = this; @@ -109,7 +123,7 @@ this.initialDate = options.initialDate || new Date(); this.zIndex = options.zIndex || this.element.data('z-index') || undefined; this.title = typeof options.title === 'undefined' ? false : options.title; - this.defaultTimeZone = (new Date).toString().split('(')[1].slice(0, -1); + this.defaultTimeZone = getTzName(); this.timezone = options.timezone || this.defaultTimeZone; this.icons = { @@ -1886,4 +1900,4 @@ $('[data-provide="datetimepicker-inline"]').datetimepicker(); }); -})); +})); \ No newline at end of file diff --git a/assets/js/bootstrap-datetimepicker.min.js b/assets/js/bootstrap-datetimepicker.min.js index 51e89b4..11a7fa0 100755 --- a/assets/js/bootstrap-datetimepicker.min.js +++ b/assets/js/bootstrap-datetimepicker.min.js @@ -1,2 +1,2 @@ -!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e,t){function i(){return new Date(Date.UTC.apply(Date,arguments))}"indexOf"in Array.prototype||(Array.prototype.indexOf=function(e,i){i===t&&(i=0),0>i&&(i+=this.length),0>i&&(i=0);for(var s=this.length;s>i;i++)if(i in this&&this[i]===e)return i;return-1});var s=function(i,s){var a=this;this.element=e(i),this.container=s.container||"body",this.language=s.language||this.element.data("date-language")||"en",this.language=this.language in n?this.language:this.language.split("-")[0],this.language=this.language in n?this.language:"en",this.isRTL=n[this.language].rtl||!1,this.formatType=s.formatType||this.element.data("format-type")||"standard",this.format=h.parseFormat(s.format||this.element.data("date-format")||n[this.language].format||h.getDefaultFormat(this.formatType,"input"),this.formatType),this.isInline=!1,this.isVisible=!1,this.isInput=this.element.is("input"),this.fontAwesome=s.fontAwesome||this.element.data("font-awesome")||!1,this.bootcssVer=s.bootcssVer||(this.isInput?this.element.is(".form-control")?3:2:this.bootcssVer=this.element.is(".input-group")?3:2),this.component=this.element.is(".date")?3==this.bootcssVer?this.element.find(".input-group-addon .glyphicon-th, .input-group-addon .glyphicon-time, .input-group-addon .glyphicon-remove, .input-group-addon .glyphicon-calendar, .input-group-addon .fa-calendar, .input-group-addon .fa-clock-o").parent():this.element.find(".add-on .icon-th, .add-on .icon-time, .add-on .icon-calendar, .add-on .fa-calendar, .add-on .fa-clock-o").parent():!1,this.componentReset=this.element.is(".date")?3==this.bootcssVer?this.element.find(".input-group-addon .glyphicon-remove, .input-group-addon .fa-times").parent():this.element.find(".add-on .icon-remove, .add-on .fa-times").parent():!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.linkField=s.linkField||this.element.data("link-field")||!1,this.linkFormat=h.parseFormat(s.linkFormat||this.element.data("link-format")||h.getDefaultFormat(this.formatType,"link"),this.formatType),this.minuteStep=s.minuteStep||this.element.data("minute-step")||5,this.pickerPosition=s.pickerPosition||this.element.data("picker-position")||"bottom-right",this.showMeridian=s.showMeridian||this.element.data("show-meridian")||!1,this.initialDate=s.initialDate||new Date,this.zIndex=s.zIndex||this.element.data("z-index")||t,this.title="undefined"==typeof s.title?!1:s.title,this.defaultTimeZone=(new Date).toString().split("(")[1].slice(0,-1),this.timezone=s.timezone||this.defaultTimeZone,this.icons={leftArrow:this.fontAwesome?"fa-arrow-left":3===this.bootcssVer?"glyphicon-arrow-left":"icon-arrow-left",rightArrow:this.fontAwesome?"fa-arrow-right":3===this.bootcssVer?"glyphicon-arrow-right":"icon-arrow-right"},this.icontype=this.fontAwesome?"fa":"glyphicon",this._attachEvents(),this.clickedOutside=function(t){0===e(t.target).closest(".datetimepicker").length&&a.hide()},this.formatViewType="datetime","formatViewType"in s?this.formatViewType=s.formatViewType:"formatViewType"in this.element.data()&&(this.formatViewType=this.element.data("formatViewType")),this.minView=0,"minView"in s?this.minView=s.minView:"minView"in this.element.data()&&(this.minView=this.element.data("min-view")),this.minView=h.convertViewMode(this.minView),this.maxView=h.modes.length-1,"maxView"in s?this.maxView=s.maxView:"maxView"in this.element.data()&&(this.maxView=this.element.data("max-view")),this.maxView=h.convertViewMode(this.maxView),this.wheelViewModeNavigation=!1,"wheelViewModeNavigation"in s?this.wheelViewModeNavigation=s.wheelViewModeNavigation:"wheelViewModeNavigation"in this.element.data()&&(this.wheelViewModeNavigation=this.element.data("view-mode-wheel-navigation")),this.wheelViewModeNavigationInverseDirection=!1,"wheelViewModeNavigationInverseDirection"in s?this.wheelViewModeNavigationInverseDirection=s.wheelViewModeNavigationInverseDirection:"wheelViewModeNavigationInverseDirection"in this.element.data()&&(this.wheelViewModeNavigationInverseDirection=this.element.data("view-mode-wheel-navigation-inverse-dir")),this.wheelViewModeNavigationDelay=100,"wheelViewModeNavigationDelay"in s?this.wheelViewModeNavigationDelay=s.wheelViewModeNavigationDelay:"wheelViewModeNavigationDelay"in this.element.data()&&(this.wheelViewModeNavigationDelay=this.element.data("view-mode-wheel-navigation-delay")),this.startViewMode=2,"startView"in s?this.startViewMode=s.startView:"startView"in this.element.data()&&(this.startViewMode=this.element.data("start-view")),this.startViewMode=h.convertViewMode(this.startViewMode),this.viewMode=this.startViewMode,this.viewSelect=this.minView,"viewSelect"in s?this.viewSelect=s.viewSelect:"viewSelect"in this.element.data()&&(this.viewSelect=this.element.data("view-select")),this.viewSelect=h.convertViewMode(this.viewSelect),this.forceParse=!0,"forceParse"in s?this.forceParse=s.forceParse:"dateForceParse"in this.element.data()&&(this.forceParse=this.element.data("date-force-parse"));for(var o=3===this.bootcssVer?h.templateV3:h.template;-1!==o.indexOf("{iconType}");)o=o.replace("{iconType}",this.icontype);for(;-1!==o.indexOf("{leftArrow}");)o=o.replace("{leftArrow}",this.icons.leftArrow);for(;-1!==o.indexOf("{rightArrow}");)o=o.replace("{rightArrow}",this.icons.rightArrow);if(this.picker=e(o).appendTo(this.isInline?this.element:this.container).on({click:e.proxy(this.click,this),mousedown:e.proxy(this.mousedown,this)}),this.wheelViewModeNavigation&&(e.fn.mousewheel?this.picker.on({mousewheel:e.proxy(this.mousewheel,this)}):console.log("Mouse Wheel event is not supported. Please include the jQuery Mouse Wheel plugin before enabling this option")),this.isInline?this.picker.addClass("datetimepicker-inline"):this.picker.addClass("datetimepicker-dropdown-"+this.pickerPosition+" dropdown-menu"),this.isRTL){this.picker.addClass("datetimepicker-rtl");var r=3===this.bootcssVer?".prev span, .next span":".prev i, .next i";this.picker.find(r).toggleClass(this.icons.leftArrow+" "+this.icons.rightArrow)}e(document).on("mousedown",this.clickedOutside),this.autoclose=!1,"autoclose"in s?this.autoclose=s.autoclose:"dateAutoclose"in this.element.data()&&(this.autoclose=this.element.data("date-autoclose")),this.keyboardNavigation=!0,"keyboardNavigation"in s?this.keyboardNavigation=s.keyboardNavigation:"dateKeyboardNavigation"in this.element.data()&&(this.keyboardNavigation=this.element.data("date-keyboard-navigation")),this.todayBtn=s.todayBtn||this.element.data("date-today-btn")||!1,this.clearBtn=s.clearBtn||this.element.data("date-clear-btn")||!1,this.todayHighlight=s.todayHighlight||this.element.data("date-today-highlight")||!1,this.weekStart=(s.weekStart||this.element.data("date-weekstart")||n[this.language].weekStart||0)%7,this.weekEnd=(this.weekStart+6)%7,this.startDate=-(1/0),this.endDate=1/0,this.datesDisabled=[],this.daysOfWeekDisabled=[],this.setStartDate(s.startDate||this.element.data("date-startdate")),this.setEndDate(s.endDate||this.element.data("date-enddate")),this.setDatesDisabled(s.datesDisabled||this.element.data("date-dates-disabled")),this.setDaysOfWeekDisabled(s.daysOfWeekDisabled||this.element.data("date-days-of-week-disabled")),this.setMinutesDisabled(s.minutesDisabled||this.element.data("date-minute-disabled")),this.setHoursDisabled(s.hoursDisabled||this.element.data("date-hour-disabled")),this.fillDow(),this.fillMonths(),this.update(),this.showMode(),this.isInline&&this.show()};s.prototype={constructor:s,_events:[],_attachEvents:function(){this._detachEvents(),this.isInput?this._events=[[this.element,{focus:e.proxy(this.show,this),keyup:e.proxy(this.update,this),keydown:e.proxy(this.keydown,this)}]]:this.component&&this.hasInput?(this._events=[[this.element.find("input"),{focus:e.proxy(this.show,this),keyup:e.proxy(this.update,this),keydown:e.proxy(this.keydown,this)}],[this.component,{click:e.proxy(this.show,this)}]],this.componentReset&&this._events.push([this.componentReset,{click:e.proxy(this.reset,this)}])):this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:e.proxy(this.show,this)}]];for(var t,i,s=0;s=this.startDate&&e<=this.endDate?(this.date=e,this.setValue(),this.viewDate=this.date,this.fill()):this.element.trigger({type:"outOfRange",date:e,startDate:this.startDate,endDate:this.endDate})},setFormat:function(e){this.format=h.parseFormat(e,this.formatType);var t;this.isInput?t=this.element:this.component&&(t=this.element.find("input")),t&&t.val()&&this.setValue()},setValue:function(){var t=this.getFormattedDate();this.isInput?this.element.val(t):(this.component&&this.element.find("input").val(t),this.element.data("date",t)),this.linkField&&e("#"+this.linkField).val(this.getFormattedDate(this.linkFormat))},getFormattedDate:function(e){return e==t&&(e=this.format),h.formatDate(this.date,e,this.language,this.formatType,this.timezone)},setStartDate:function(e){this.startDate=e||-(1/0),this.startDate!==-(1/0)&&(this.startDate=h.parseDate(this.startDate,this.format,this.language,this.formatType,this.timezone)),this.update(),this.updateNavArrows()},setEndDate:function(e){this.endDate=e||1/0,this.endDate!==1/0&&(this.endDate=h.parseDate(this.endDate,this.format,this.language,this.formatType,this.timezone)),this.update(),this.updateNavArrows()},setDatesDisabled:function(t){this.datesDisabled=t||[],e.isArray(this.datesDisabled)||(this.datesDisabled=this.datesDisabled.split(/,\s*/)),this.datesDisabled=e.map(this.datesDisabled,function(e){return h.parseDate(e,this.format,this.language,this.formatType,this.timezone).toDateString()}),this.update(),this.updateNavArrows()},setTitle:function(e,t){return this.picker.find(e).find("th:eq(1)").text(this.title===!1?t:this.title)},setDaysOfWeekDisabled:function(t){this.daysOfWeekDisabled=t||[],e.isArray(this.daysOfWeekDisabled)||(this.daysOfWeekDisabled=this.daysOfWeekDisabled.split(/,\s*/)),this.daysOfWeekDisabled=e.map(this.daysOfWeekDisabled,function(e){return parseInt(e,10)}),this.update(),this.updateNavArrows()},setMinutesDisabled:function(t){this.minutesDisabled=t||[],e.isArray(this.minutesDisabled)||(this.minutesDisabled=this.minutesDisabled.split(/,\s*/)),this.minutesDisabled=e.map(this.minutesDisabled,function(e){return parseInt(e,10)}),this.update(),this.updateNavArrows()},setHoursDisabled:function(t){this.hoursDisabled=t||[],e.isArray(this.hoursDisabled)||(this.hoursDisabled=this.hoursDisabled.split(/,\s*/)),this.hoursDisabled=e.map(this.hoursDisabled,function(e){return parseInt(e,10)}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){if(!this.zIndex){var t=0;e("div").each(function(){var i=parseInt(e(this).css("zIndex"),10);i>t&&(t=i)}),this.zIndex=t+10}var i,s,a,n;n=this.container instanceof e?this.container.offset():e(this.container).offset(),this.component?(i=this.component.offset(),a=i.left,"bottom-left"!=this.pickerPosition&&"top-left"!=this.pickerPosition||(a+=this.component.outerWidth()-this.picker.outerWidth())):(i=this.element.offset(),a=i.left,"bottom-left"!=this.pickerPosition&&"top-left"!=this.pickerPosition||(a+=this.element.outerWidth()-this.picker.outerWidth()));var h=document.body.clientWidth||window.innerWidth;a+220>h&&(a=h-220),s="top-left"==this.pickerPosition||"top-right"==this.pickerPosition?i.top-this.picker.outerHeight():i.top+this.height,s-=n.top,a-=n.left,this.picker.css({top:s,left:a,zIndex:this.zIndex})}},update:function(){var e,t=!1;arguments&&arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof Date)?(e=arguments[0],t=!0):(e=(this.isInput?this.element.val():this.element.find("input").val())||this.element.data("date")||this.initialDate,("string"==typeof e||e instanceof String)&&(e=e.replace(/^\s+|\s+$/g,""))),e||(e=new Date,t=!1),this.date=h.parseDate(e,this.format,this.language,this.formatType,this.timezone),t&&this.setValue(),this.datethis.endDate?this.viewDate=new Date(this.endDate):this.viewDate=new Date(this.date),this.fill()},fillDow:function(){for(var e=this.weekStart,t="";e'+n[this.language].daysMin[e++%7]+"";t+="",this.picker.find(".datetimepicker-days thead").append(t)},fillMonths:function(){for(var e="",t=0;12>t;)e+=''+n[this.language].monthsShort[t++]+"";this.picker.find(".datetimepicker-months td").html(e)},fill:function(){if(null!=this.date&&null!=this.viewDate){var t=new Date(this.viewDate),s=t.getUTCFullYear(),a=t.getUTCMonth(),o=t.getUTCDate(),r=t.getUTCHours(),d=t.getUTCMinutes(),l=this.startDate!==-(1/0)?this.startDate.getUTCFullYear():-(1/0),c=this.startDate!==-(1/0)?this.startDate.getUTCMonth():-(1/0),u=this.endDate!==1/0?this.endDate.getUTCFullYear():1/0,p=this.endDate!==1/0?this.endDate.getUTCMonth()+1:1/0,m=new i(this.date.getUTCFullYear(),this.date.getUTCMonth(),this.date.getUTCDate()).valueOf(),f=new Date;if(this.setTitle(".datetimepicker-days",n[this.language].months[a]+" "+s),"time"==this.formatViewType){var v=this.getFormattedDate();this.setTitle(".datetimepicker-hours",v),this.setTitle(".datetimepicker-minutes",v)}else this.setTitle(".datetimepicker-hours",o+" "+n[this.language].months[a]+" "+s),this.setTitle(".datetimepicker-minutes",o+" "+n[this.language].months[a]+" "+s);this.picker.find("tfoot th.today").text(n[this.language].today||n.en.today).toggle(this.todayBtn!==!1),this.picker.find("tfoot th.clear").text(n[this.language].clear||n.en.clear).toggle(this.clearBtn!==!1),this.updateNavArrows(),this.fillMonths();var g=i(s,a-1,28,0,0,0,0),w=h.getDaysInMonth(g.getUTCFullYear(),g.getUTCMonth());g.setUTCDate(w),g.setUTCDate(w-(g.getUTCDay()-this.weekStart+7)%7);var D=new Date(g);D.setUTCDate(D.getUTCDate()+42),D=D.valueOf();for(var y,T=[];g.valueOf()"),y="",g.getUTCFullYear()s||g.getUTCFullYear()==s&&g.getUTCMonth()>a)&&(y+=" new"),this.todayHighlight&&g.getUTCFullYear()==f.getFullYear()&&g.getUTCMonth()==f.getMonth()&&g.getUTCDate()==f.getDate()&&(y+=" today"),g.valueOf()==m&&(y+=" active"),(g.valueOf()+864e5<=this.startDate||g.valueOf()>this.endDate||-1!==e.inArray(g.getUTCDay(),this.daysOfWeekDisabled)||-1!==e.inArray(g.toDateString(),this.datesDisabled))&&(y+=" disabled"),T.push(''+g.getUTCDate()+""),g.getUTCDay()==this.weekEnd&&T.push(""),g.setUTCDate(g.getUTCDate()+1);this.picker.find(".datetimepicker-days tbody").empty().append(T.join("")),T=[];for(var M="",C="",b="",k=this.hoursDisabled||[],U=0;24>U;U++)if(-1===k.indexOf(U)){var V=i(s,a,o,U);y="",V.valueOf()+36e5<=this.startDate||V.valueOf()>this.endDate?y+=" disabled":r==U&&(y+=" active"),this.showMeridian&&2==n[this.language].meridiem.length?(C=12>U?n[this.language].meridiem[0]:n[this.language].meridiem[1],C!=b&&(""!=b&&T.push(""),T.push('
'+C.toUpperCase()+"")),b=C,M=U%12?U%12:12,T.push('U?"am":"pm")+'">'+M+""),23==U&&T.push("
")):(M=U+":00",T.push(''+M+""))}this.picker.find(".datetimepicker-hours td").html(T.join("")),T=[],M="",C="",b="";for(var x=this.minutesDisabled||[],U=0;60>U;U+=this.minuteStep)if(-1===x.indexOf(U)){var V=i(s,a,o,r,U,0);y="",V.valueOf()this.endDate?y+=" disabled":Math.floor(d/this.minuteStep)==Math.floor(U/this.minuteStep)&&(y+=" active"),this.showMeridian&&2==n[this.language].meridiem.length?(C=12>r?n[this.language].meridiem[0]:n[this.language].meridiem[1],C!=b&&(""!=b&&T.push(""),T.push('
'+C.toUpperCase()+"")),b=C,M=r%12?r%12:12,T.push(''+M+":"+(10>U?"0"+U:U)+""),59==U&&T.push("
")):(M=U+":00",T.push(''+r+":"+(10>U?"0"+U:U)+""))}this.picker.find(".datetimepicker-minutes td").html(T.join(""));var S=this.date.getUTCFullYear(),F=this.setTitle(".datetimepicker-months",s).end().find("span").removeClass("active");if(S==s){var H=F.length-12;F.eq(this.date.getUTCMonth()+H).addClass("active")}(l>s||s>u)&&F.addClass("disabled"),s==l&&F.slice(0,c).addClass("disabled"),s==u&&F.slice(p).addClass("disabled"),T="",s=10*parseInt(s/10,10);var N=this.setTitle(".datetimepicker-years",s+"-"+(s+9)).end().find("td");s-=1;for(var U=-1;11>U;U++)T+='s||s>u?" disabled":"")+'">'+s+"",s+=1;N.html(T),this.place()}},updateNavArrows:function(){var e=new Date(this.viewDate),t=e.getUTCFullYear(),i=e.getUTCMonth(),s=e.getUTCDate(),a=e.getUTCHours();switch(this.viewMode){case 0:this.startDate!==-(1/0)&&t<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()&&s<=this.startDate.getUTCDate()&&a<=this.startDate.getUTCHours()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&t>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()&&s>=this.endDate.getUTCDate()&&a>=this.endDate.getUTCHours()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:this.startDate!==-(1/0)&&t<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()&&s<=this.startDate.getUTCDate()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&t>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()&&s>=this.endDate.getUTCDate()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 2:this.startDate!==-(1/0)&&t<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&t>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 3:case 4:this.startDate!==-(1/0)&&t<=this.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&t>=this.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}},mousewheel:function(t){if(t.preventDefault(),t.stopPropagation(),!this.wheelPause){this.wheelPause=!0;var i=t.originalEvent,s=i.wheelDelta,a=s>0?1:0===s?0:-1;this.wheelViewModeNavigationInverseDirection&&(a=-a),this.showMode(a),setTimeout(e.proxy(function(){this.wheelPause=!1},this),this.wheelViewModeNavigationDelay)}},click:function(t){t.stopPropagation(),t.preventDefault();var s=e(t.target).closest("span, td, th, legend");if(s.is("."+this.icontype)&&(s=e(s).parent().closest("span, td, th, legend")),1==s.length){if(s.is(".disabled"))return void this.element.trigger({type:"outOfRange",date:this.viewDate,startDate:this.startDate,endDate:this.endDate});switch(s[0].nodeName.toLowerCase()){case"th":switch(s[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var a=h.modes[this.viewMode].navStep*("prev"==s[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,a);break;case 1:this.viewDate=this.moveDate(this.viewDate,a);break;case 2:this.viewDate=this.moveMonth(this.viewDate,a);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,a)}this.fill(),this.element.trigger({type:s[0].className+":"+this.convertViewModeText(this.viewMode),date:this.viewDate,startDate:this.startDate,endDate:this.endDate});break;case"clear":this.reset(),this.autoclose&&this.hide();break;case"today":var n=new Date;n=i(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),0),nthis.endDate&&(n=this.endDate),this.viewMode=this.startViewMode,this.showMode(0),this._setDate(n),this.fill(),this.autoclose&&this.hide()}break;case"span":if(!s.is(".disabled")){var o=this.viewDate.getUTCFullYear(),r=this.viewDate.getUTCMonth(),d=this.viewDate.getUTCDate(),l=this.viewDate.getUTCHours(),c=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();if(s.is(".month")?(this.viewDate.setUTCDate(1),r=s.parent().find("span").index(s),d=this.viewDate.getUTCDate(),this.viewDate.setUTCMonth(r),this.element.trigger({type:"changeMonth",date:this.viewDate}),this.viewSelect>=3&&this._setDate(i(o,r,d,l,c,u,0))):s.is(".year")?(this.viewDate.setUTCDate(1),o=parseInt(s.text(),10)||0,this.viewDate.setUTCFullYear(o),this.element.trigger({type:"changeYear",date:this.viewDate}),this.viewSelect>=4&&this._setDate(i(o,r,d,l,c,u,0))):s.is(".hour")?(l=parseInt(s.text(),10)||0,(s.hasClass("hour_am")||s.hasClass("hour_pm"))&&(12==l&&s.hasClass("hour_am")?l=0:12!=l&&s.hasClass("hour_pm")&&(l+=12)),this.viewDate.setUTCHours(l),this.element.trigger({type:"changeHour",date:this.viewDate}),this.viewSelect>=1&&this._setDate(i(o,r,d,l,c,u,0))):s.is(".minute")&&(c=parseInt(s.text().substr(s.text().indexOf(":")+1),10)||0,this.viewDate.setUTCMinutes(c),this.element.trigger({type:"changeMinute",date:this.viewDate}),this.viewSelect>=0&&this._setDate(i(o,r,d,l,c,u,0))),0!=this.viewMode){var p=this.viewMode;this.showMode(-1),this.fill(),p==this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide()}break;case"td":if(s.is(".day")&&!s.is(".disabled")){var d=parseInt(s.text(),10)||1,o=this.viewDate.getUTCFullYear(),r=this.viewDate.getUTCMonth(),l=this.viewDate.getUTCHours(),c=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();s.is(".old")?0===r?(r=11,o-=1):r-=1:s.is(".new")&&(11==r?(r=0,o+=1):r+=1),this.viewDate.setUTCFullYear(o),this.viewDate.setUTCMonth(r,d),this.element.trigger({type:"changeDay",date:this.viewDate}),this.viewSelect>=2&&this._setDate(i(o,r,d,l,c,u,0))}var p=this.viewMode;this.showMode(-1),this.fill(),p==this.viewMode&&this.autoclose&&this.hide()}}},_setDate:function(e,t){t&&"date"!=t||(this.date=e),t&&"view"!=t||(this.viewDate=e),this.fill(),this.setValue();var i;this.isInput?i=this.element:this.component&&(i=this.element.find("input")),i&&(i.change(),this.autoclose&&(!t||"date"==t)),this.element.trigger({type:"changeDate",date:this.getDate()}),null==e&&(this.date=this.viewDate)},moveMinute:function(e,t){if(!t)return e;var i=new Date(e.valueOf());return i.setUTCMinutes(i.getUTCMinutes()+t*this.minuteStep),i},moveHour:function(e,t){if(!t)return e;var i=new Date(e.valueOf());return i.setUTCHours(i.getUTCHours()+t),i},moveDate:function(e,t){if(!t)return e;var i=new Date(e.valueOf());return i.setUTCDate(i.getUTCDate()+t),i},moveMonth:function(e,t){if(!t)return e;var i,s,a=new Date(e.valueOf()),n=a.getUTCDate(),h=a.getUTCMonth(),o=Math.abs(t);if(t=t>0?1:-1,1==o)s=-1==t?function(){return a.getUTCMonth()==h}:function(){return a.getUTCMonth()!=i},i=h+t,a.setUTCMonth(i),(0>i||i>11)&&(i=(i+12)%12);else{for(var r=0;o>r;r++)a=this.moveMonth(a,t);i=a.getUTCMonth(),a.setUTCDate(n),s=function(){return i!=a.getUTCMonth()}}for(;s();)a.setUTCDate(--n),a.setUTCMonth(i);return a},moveYear:function(e,t){return this.moveMonth(e,12*t)},dateWithinRange:function(e){return e>=this.startDate&&e<=this.endDate},keydown:function(e){if(this.picker.is(":not(:visible)"))return void(27==e.keyCode&&this.show());var t,i,s,a=!1;switch(e.keyCode){case 27:this.hide(),e.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation)break;t=37==e.keyCode?-1:1,viewMode=this.viewMode,e.ctrlKey?viewMode+=2:e.shiftKey&&(viewMode+=1),4==viewMode?(i=this.moveYear(this.date,t),s=this.moveYear(this.viewDate,t)):3==viewMode?(i=this.moveMonth(this.date,t),s=this.moveMonth(this.viewDate,t)):2==viewMode?(i=this.moveDate(this.date,t),s=this.moveDate(this.viewDate,t)):1==viewMode?(i=this.moveHour(this.date,t),s=this.moveHour(this.viewDate,t)):0==viewMode&&(i=this.moveMinute(this.date,t),s=this.moveMinute(this.viewDate,t)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),e.preventDefault(),a=!0);break;case 38:case 40:if(!this.keyboardNavigation)break;t=38==e.keyCode?-1:1,viewMode=this.viewMode,e.ctrlKey?viewMode+=2:e.shiftKey&&(viewMode+=1),4==viewMode?(i=this.moveYear(this.date,t),s=this.moveYear(this.viewDate,t)):3==viewMode?(i=this.moveMonth(this.date,t),s=this.moveMonth(this.viewDate,t)):2==viewMode?(i=this.moveDate(this.date,7*t),s=this.moveDate(this.viewDate,7*t)):1==viewMode?this.showMeridian?(i=this.moveHour(this.date,6*t),s=this.moveHour(this.viewDate,6*t)):(i=this.moveHour(this.date,4*t),s=this.moveHour(this.viewDate,4*t)):0==viewMode&&(i=this.moveMinute(this.date,4*t),s=this.moveMinute(this.viewDate,4*t)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),e.preventDefault(),a=!0);break;case 13:if(0!=this.viewMode){var n=this.viewMode;this.showMode(-1),this.fill(),n==this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide();e.preventDefault();break;case 9:this.hide()}if(a){var h;this.isInput?h=this.element:this.component&&(h=this.element.find("input")),h&&h.change(),this.element.trigger({type:"changeDate",date:this.getDate()})}},showMode:function(e){if(e){var t=Math.max(0,Math.min(h.modes.length-1,this.viewMode+e));t>=this.minView&&t<=this.maxView&&(this.element.trigger({type:"changeMode",date:this.viewDate,oldViewMode:this.viewMode,newViewMode:t}),this.viewMode=t)}this.picker.find(">div").hide().filter(".datetimepicker-"+h.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()},reset:function(){this._setDate(null,"date")},convertViewModeText:function(e){switch(e){case 4:return"decade";case 3:return"year";case 2:return"month";case 1:return"day";case 0:return"hour"}}};var a=e.fn.datetimepicker;e.fn.datetimepicker=function(i){var a=Array.apply(null,arguments);a.shift();var n;return this.each(function(){var h=e(this),o=h.data("datetimepicker"),r="object"==typeof i&&i;return o||h.data("datetimepicker",o=new s(this,e.extend({},e.fn.datetimepicker.defaults,r))),"string"==typeof i&&"function"==typeof o[i]&&(n=o[i].apply(o,a),n!==t)?!1:void 0}),n!==t?n:this},e.fn.datetimepicker.defaults={},e.fn.datetimepicker.Constructor=s;var n=e.fn.datetimepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["am","pm"],suffix:["st","nd","rd","th"],today:"Today",clear:"Clear"}},h={modes:[{clsName:"minutes",navFnc:"Hours",navStep:1},{clsName:"hours",navFnc:"Date",navStep:1},{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(e){return e%4===0&&e%100!==0||e%400===0},getDaysInMonth:function(e,t){return[31,h.isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},getDefaultFormat:function(e,t){if("standard"==e)return"input"==t?"yyyy-mm-dd hh:ii":"yyyy-mm-dd hh:ii:ss";if("php"==e)return"input"==t?"Y-m-d H:i":"Y-m-d H:i:s";throw new Error("Invalid format type.")},validParts:function(e){if("standard"==e)return/t|hh?|HH?|p|P|z|Z|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g;if("php"==e)return/[dDjlNwzFmMnStyYaABgGhHis]/g;throw new Error("Invalid format type.")},nonpunctuation:/[^ -\/:-@\[-`{-~\t\n\rTZ]+/g,parseFormat:function(e,t){var i=e.replace(this.validParts(t),"\x00").split("\x00"),s=e.match(this.validParts(t));if(!i||!i.length||!s||0==s.length)throw new Error("Invalid date format.");return{separators:i,parts:s}},parseDate:function(t,a,h,o,r){if(t instanceof Date){var d=new Date(t.valueOf()-6e4*t.getTimezoneOffset());return d.setMilliseconds(0),d}if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(t)&&(a=this.parseFormat("yyyy-mm-dd",o)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(t)&&(a=this.parseFormat("yyyy-mm-dd hh:ii",o)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(t)&&(a=this.parseFormat("yyyy-mm-dd hh:ii:ss",o)),/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(t)){var l,c,u=/([-+]\d+)([dmwy])/,p=t.match(/([-+]\d+)([dmwy])/g);t=new Date;for(var m=0;mt;)t+=12;for(t%=12,e.setUTCMonth(t);e.getUTCMonth()!=t;){if(isNaN(e.getUTCMonth()))return e;e.setUTCDate(e.getUTCDate()-1)}return e},d:function(e,t){return e.setUTCDate(t)},p:function(e,t){return e.setUTCHours(1==t?e.getUTCHours()+12:e.getUTCHours())},z:function(){return r}};if(D.M=D.MM=D.mm=D.m,D.dd=D.d,D.P=D.p,D.Z=D.z,t=i(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()),p.length==a.parts.length){for(var m=0,y=a.parts.length;y>m;m++){if(f=parseInt(p[m],10),l=a.parts[m],isNaN(f))switch(l){case"MM":v=e(n[h].months).filter(function(){var e=this.slice(0,p[m].length),t=p[m].slice(0,e.length);return e==t}),f=e.inArray(v[0],n[h].months)+1;break;case"M":v=e(n[h].monthsShort).filter(function(){var e=this.slice(0,p[m].length),t=p[m].slice(0,e.length);return e.toLowerCase()==t.toLowerCase()}),f=e.inArray(v[0],n[h].monthsShort)+1;break;case"p":case"P":f=e.inArray(p[m].toLowerCase(),n[h].meridiem);break;case"z":case"Z":} -g[l]=f}for(var T,m=0;ml;l++)d.length&&t.push(d.shift()),t.push(r[i.parts[l]]);return d.length&&t.push(d.shift()),t.join("")},convertViewMode:function(e){switch(e){case 4:case"decade":e=4;break;case 3:case"year":e=3;break;case 2:case"month":e=2;break;case 1:case"day":e=1;break;case 0:case"hour":e=0}return e},headTemplate:'',headTemplateV3:' ',contTemplate:'',footTemplate:''};h.template='
'+h.headTemplate+h.contTemplate+h.footTemplate+'
'+h.headTemplate+h.contTemplate+h.footTemplate+'
'+h.headTemplate+""+h.footTemplate+'
'+h.headTemplate+h.contTemplate+h.footTemplate+'
'+h.headTemplate+h.contTemplate+h.footTemplate+"
",h.templateV3='
'+h.headTemplateV3+h.contTemplate+h.footTemplate+'
'+h.headTemplateV3+h.contTemplate+h.footTemplate+'
'+h.headTemplateV3+""+h.footTemplate+'
'+h.headTemplateV3+h.contTemplate+h.footTemplate+'
'+h.headTemplateV3+h.contTemplate+h.footTemplate+"
",e.fn.datetimepicker.DPGlobal=h,e.fn.datetimepicker.noConflict=function(){return e.fn.datetimepicker=a,this},e(document).on("focus.datetimepicker.data-api click.datetimepicker.data-api",'[data-provide="datetimepicker"]',function(t){var i=e(this);i.data("datetimepicker")||(t.preventDefault(),i.datetimepicker("show"))}),e(function(){e('[data-provide="datetimepicker-inline"]').datetimepicker()})}); \ No newline at end of file +!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e,t){function i(){return new Date(Date.UTC.apply(Date,arguments))}"indexOf"in Array.prototype||(Array.prototype.indexOf=function(e,i){i===t&&(i=0),0>i&&(i+=this.length),0>i&&(i=0);for(var s=this.length;s>i;i++)if(i in this&&this[i]===e)return i;return-1});var s=function(e){return""===e?"":10>e?"0"+e:""+e},a=function(e){var t=e||new Date,i=t.getTimezoneOffset(),a=Math.abs(i),n=i?Math.floor(a/60):"",h=i?a%60:"",o=i?i>0?"GMT-":"GMT+":"GMT";return o+s(n)+s(h)},n=function(i,s){var n=this;this.element=e(i),this.container=s.container||"body",this.language=s.language||this.element.data("date-language")||"en",this.language=this.language in o?this.language:this.language.split("-")[0],this.language=this.language in o?this.language:"en",this.isRTL=o[this.language].rtl||!1,this.formatType=s.formatType||this.element.data("format-type")||"standard",this.format=r.parseFormat(s.format||this.element.data("date-format")||o[this.language].format||r.getDefaultFormat(this.formatType,"input"),this.formatType),this.isInline=!1,this.isVisible=!1,this.isInput=this.element.is("input"),this.fontAwesome=s.fontAwesome||this.element.data("font-awesome")||!1,this.bootcssVer=s.bootcssVer||(this.isInput?this.element.is(".form-control")?3:2:this.bootcssVer=this.element.is(".input-group")?3:2),this.component=this.element.is(".date")?3==this.bootcssVer?this.element.find(".input-group-addon .glyphicon-th, .input-group-addon .glyphicon-time, .input-group-addon .glyphicon-remove, .input-group-addon .glyphicon-calendar, .input-group-addon .fa-calendar, .input-group-addon .fa-clock-o").parent():this.element.find(".add-on .icon-th, .add-on .icon-time, .add-on .icon-calendar, .add-on .fa-calendar, .add-on .fa-clock-o").parent():!1,this.componentReset=this.element.is(".date")?3==this.bootcssVer?this.element.find(".input-group-addon .glyphicon-remove, .input-group-addon .fa-times").parent():this.element.find(".add-on .icon-remove, .add-on .fa-times").parent():!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.linkField=s.linkField||this.element.data("link-field")||!1,this.linkFormat=r.parseFormat(s.linkFormat||this.element.data("link-format")||r.getDefaultFormat(this.formatType,"link"),this.formatType),this.minuteStep=s.minuteStep||this.element.data("minute-step")||5,this.pickerPosition=s.pickerPosition||this.element.data("picker-position")||"bottom-right",this.showMeridian=s.showMeridian||this.element.data("show-meridian")||!1,this.initialDate=s.initialDate||new Date,this.zIndex=s.zIndex||this.element.data("z-index")||t,this.title="undefined"==typeof s.title?!1:s.title,this.defaultTimeZone=a(),this.timezone=s.timezone||this.defaultTimeZone,this.icons={leftArrow:this.fontAwesome?"fa-arrow-left":3===this.bootcssVer?"glyphicon-arrow-left":"icon-arrow-left",rightArrow:this.fontAwesome?"fa-arrow-right":3===this.bootcssVer?"glyphicon-arrow-right":"icon-arrow-right"},this.icontype=this.fontAwesome?"fa":"glyphicon",this._attachEvents(),this.clickedOutside=function(t){0===e(t.target).closest(".datetimepicker").length&&n.hide()},this.formatViewType="datetime","formatViewType"in s?this.formatViewType=s.formatViewType:"formatViewType"in this.element.data()&&(this.formatViewType=this.element.data("formatViewType")),this.minView=0,"minView"in s?this.minView=s.minView:"minView"in this.element.data()&&(this.minView=this.element.data("min-view")),this.minView=r.convertViewMode(this.minView),this.maxView=r.modes.length-1,"maxView"in s?this.maxView=s.maxView:"maxView"in this.element.data()&&(this.maxView=this.element.data("max-view")),this.maxView=r.convertViewMode(this.maxView),this.wheelViewModeNavigation=!1,"wheelViewModeNavigation"in s?this.wheelViewModeNavigation=s.wheelViewModeNavigation:"wheelViewModeNavigation"in this.element.data()&&(this.wheelViewModeNavigation=this.element.data("view-mode-wheel-navigation")),this.wheelViewModeNavigationInverseDirection=!1,"wheelViewModeNavigationInverseDirection"in s?this.wheelViewModeNavigationInverseDirection=s.wheelViewModeNavigationInverseDirection:"wheelViewModeNavigationInverseDirection"in this.element.data()&&(this.wheelViewModeNavigationInverseDirection=this.element.data("view-mode-wheel-navigation-inverse-dir")),this.wheelViewModeNavigationDelay=100,"wheelViewModeNavigationDelay"in s?this.wheelViewModeNavigationDelay=s.wheelViewModeNavigationDelay:"wheelViewModeNavigationDelay"in this.element.data()&&(this.wheelViewModeNavigationDelay=this.element.data("view-mode-wheel-navigation-delay")),this.startViewMode=2,"startView"in s?this.startViewMode=s.startView:"startView"in this.element.data()&&(this.startViewMode=this.element.data("start-view")),this.startViewMode=r.convertViewMode(this.startViewMode),this.viewMode=this.startViewMode,this.viewSelect=this.minView,"viewSelect"in s?this.viewSelect=s.viewSelect:"viewSelect"in this.element.data()&&(this.viewSelect=this.element.data("view-select")),this.viewSelect=r.convertViewMode(this.viewSelect),this.forceParse=!0,"forceParse"in s?this.forceParse=s.forceParse:"dateForceParse"in this.element.data()&&(this.forceParse=this.element.data("date-force-parse"));for(var h=3===this.bootcssVer?r.templateV3:r.template;-1!==h.indexOf("{iconType}");)h=h.replace("{iconType}",this.icontype);for(;-1!==h.indexOf("{leftArrow}");)h=h.replace("{leftArrow}",this.icons.leftArrow);for(;-1!==h.indexOf("{rightArrow}");)h=h.replace("{rightArrow}",this.icons.rightArrow);if(this.picker=e(h).appendTo(this.isInline?this.element:this.container).on({click:e.proxy(this.click,this),mousedown:e.proxy(this.mousedown,this)}),this.wheelViewModeNavigation&&(e.fn.mousewheel?this.picker.on({mousewheel:e.proxy(this.mousewheel,this)}):console.log("Mouse Wheel event is not supported. Please include the jQuery Mouse Wheel plugin before enabling this option")),this.isInline?this.picker.addClass("datetimepicker-inline"):this.picker.addClass("datetimepicker-dropdown-"+this.pickerPosition+" dropdown-menu"),this.isRTL){this.picker.addClass("datetimepicker-rtl");var d=3===this.bootcssVer?".prev span, .next span":".prev i, .next i";this.picker.find(d).toggleClass(this.icons.leftArrow+" "+this.icons.rightArrow)}e(document).on("mousedown",this.clickedOutside),this.autoclose=!1,"autoclose"in s?this.autoclose=s.autoclose:"dateAutoclose"in this.element.data()&&(this.autoclose=this.element.data("date-autoclose")),this.keyboardNavigation=!0,"keyboardNavigation"in s?this.keyboardNavigation=s.keyboardNavigation:"dateKeyboardNavigation"in this.element.data()&&(this.keyboardNavigation=this.element.data("date-keyboard-navigation")),this.todayBtn=s.todayBtn||this.element.data("date-today-btn")||!1,this.clearBtn=s.clearBtn||this.element.data("date-clear-btn")||!1,this.todayHighlight=s.todayHighlight||this.element.data("date-today-highlight")||!1,this.weekStart=(s.weekStart||this.element.data("date-weekstart")||o[this.language].weekStart||0)%7,this.weekEnd=(this.weekStart+6)%7,this.startDate=-(1/0),this.endDate=1/0,this.datesDisabled=[],this.daysOfWeekDisabled=[],this.setStartDate(s.startDate||this.element.data("date-startdate")),this.setEndDate(s.endDate||this.element.data("date-enddate")),this.setDatesDisabled(s.datesDisabled||this.element.data("date-dates-disabled")),this.setDaysOfWeekDisabled(s.daysOfWeekDisabled||this.element.data("date-days-of-week-disabled")),this.setMinutesDisabled(s.minutesDisabled||this.element.data("date-minute-disabled")),this.setHoursDisabled(s.hoursDisabled||this.element.data("date-hour-disabled")),this.fillDow(),this.fillMonths(),this.update(),this.showMode(),this.isInline&&this.show()};n.prototype={constructor:n,_events:[],_attachEvents:function(){this._detachEvents(),this.isInput?this._events=[[this.element,{focus:e.proxy(this.show,this),keyup:e.proxy(this.update,this),keydown:e.proxy(this.keydown,this)}]]:this.component&&this.hasInput?(this._events=[[this.element.find("input"),{focus:e.proxy(this.show,this),keyup:e.proxy(this.update,this),keydown:e.proxy(this.keydown,this)}],[this.component,{click:e.proxy(this.show,this)}]],this.componentReset&&this._events.push([this.componentReset,{click:e.proxy(this.reset,this)}])):this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:e.proxy(this.show,this)}]];for(var t,i,s=0;s=this.startDate&&e<=this.endDate?(this.date=e,this.setValue(),this.viewDate=this.date,this.fill()):this.element.trigger({type:"outOfRange",date:e,startDate:this.startDate,endDate:this.endDate})},setFormat:function(e){this.format=r.parseFormat(e,this.formatType);var t;this.isInput?t=this.element:this.component&&(t=this.element.find("input")),t&&t.val()&&this.setValue()},setValue:function(){var t=this.getFormattedDate();this.isInput?this.element.val(t):(this.component&&this.element.find("input").val(t),this.element.data("date",t)),this.linkField&&e("#"+this.linkField).val(this.getFormattedDate(this.linkFormat))},getFormattedDate:function(e){return e==t&&(e=this.format),r.formatDate(this.date,e,this.language,this.formatType,this.timezone)},setStartDate:function(e){this.startDate=e||-(1/0),this.startDate!==-(1/0)&&(this.startDate=r.parseDate(this.startDate,this.format,this.language,this.formatType,this.timezone)),this.update(),this.updateNavArrows()},setEndDate:function(e){this.endDate=e||1/0,this.endDate!==1/0&&(this.endDate=r.parseDate(this.endDate,this.format,this.language,this.formatType,this.timezone)),this.update(),this.updateNavArrows()},setDatesDisabled:function(t){this.datesDisabled=t||[],e.isArray(this.datesDisabled)||(this.datesDisabled=this.datesDisabled.split(/,\s*/)),this.datesDisabled=e.map(this.datesDisabled,function(e){return r.parseDate(e,this.format,this.language,this.formatType,this.timezone).toDateString()}),this.update(),this.updateNavArrows()},setTitle:function(e,t){return this.picker.find(e).find("th:eq(1)").text(this.title===!1?t:this.title)},setDaysOfWeekDisabled:function(t){this.daysOfWeekDisabled=t||[],e.isArray(this.daysOfWeekDisabled)||(this.daysOfWeekDisabled=this.daysOfWeekDisabled.split(/,\s*/)),this.daysOfWeekDisabled=e.map(this.daysOfWeekDisabled,function(e){return parseInt(e,10)}),this.update(),this.updateNavArrows()},setMinutesDisabled:function(t){this.minutesDisabled=t||[],e.isArray(this.minutesDisabled)||(this.minutesDisabled=this.minutesDisabled.split(/,\s*/)),this.minutesDisabled=e.map(this.minutesDisabled,function(e){return parseInt(e,10)}),this.update(),this.updateNavArrows()},setHoursDisabled:function(t){this.hoursDisabled=t||[],e.isArray(this.hoursDisabled)||(this.hoursDisabled=this.hoursDisabled.split(/,\s*/)),this.hoursDisabled=e.map(this.hoursDisabled,function(e){return parseInt(e,10)}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){if(!this.zIndex){var t=0;e("div").each(function(){var i=parseInt(e(this).css("zIndex"),10);i>t&&(t=i)}),this.zIndex=t+10}var i,s,a,n;n=this.container instanceof e?this.container.offset():e(this.container).offset(),this.component?(i=this.component.offset(),a=i.left,"bottom-left"!=this.pickerPosition&&"top-left"!=this.pickerPosition||(a+=this.component.outerWidth()-this.picker.outerWidth())):(i=this.element.offset(),a=i.left,"bottom-left"!=this.pickerPosition&&"top-left"!=this.pickerPosition||(a+=this.element.outerWidth()-this.picker.outerWidth()));var h=document.body.clientWidth||window.innerWidth;a+220>h&&(a=h-220),s="top-left"==this.pickerPosition||"top-right"==this.pickerPosition?i.top-this.picker.outerHeight():i.top+this.height,s-=n.top,a-=n.left,this.picker.css({top:s,left:a,zIndex:this.zIndex})}},update:function(){var e,t=!1;arguments&&arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof Date)?(e=arguments[0],t=!0):(e=(this.isInput?this.element.val():this.element.find("input").val())||this.element.data("date")||this.initialDate,("string"==typeof e||e instanceof String)&&(e=e.replace(/^\s+|\s+$/g,""))),e||(e=new Date,t=!1),this.date=r.parseDate(e,this.format,this.language,this.formatType,this.timezone),t&&this.setValue(),this.datethis.endDate?this.viewDate=new Date(this.endDate):this.viewDate=new Date(this.date),this.fill()},fillDow:function(){for(var e=this.weekStart,t="";e'+o[this.language].daysMin[e++%7]+"";t+="",this.picker.find(".datetimepicker-days thead").append(t)},fillMonths:function(){for(var e="",t=0;12>t;)e+=''+o[this.language].monthsShort[t++]+"";this.picker.find(".datetimepicker-months td").html(e)},fill:function(){if(null!=this.date&&null!=this.viewDate){var t=new Date(this.viewDate),s=t.getUTCFullYear(),a=t.getUTCMonth(),n=t.getUTCDate(),h=t.getUTCHours(),d=t.getUTCMinutes(),l=this.startDate!==-(1/0)?this.startDate.getUTCFullYear():-(1/0),c=this.startDate!==-(1/0)?this.startDate.getUTCMonth():-(1/0),u=this.endDate!==1/0?this.endDate.getUTCFullYear():1/0,p=this.endDate!==1/0?this.endDate.getUTCMonth()+1:1/0,m=new i(this.date.getUTCFullYear(),this.date.getUTCMonth(),this.date.getUTCDate()).valueOf(),f=new Date;if(this.setTitle(".datetimepicker-days",o[this.language].months[a]+" "+s),"time"==this.formatViewType){var v=this.getFormattedDate();this.setTitle(".datetimepicker-hours",v),this.setTitle(".datetimepicker-minutes",v)}else this.setTitle(".datetimepicker-hours",n+" "+o[this.language].months[a]+" "+s),this.setTitle(".datetimepicker-minutes",n+" "+o[this.language].months[a]+" "+s);this.picker.find("tfoot th.today").text(o[this.language].today||o.en.today).toggle(this.todayBtn!==!1),this.picker.find("tfoot th.clear").text(o[this.language].clear||o.en.clear).toggle(this.clearBtn!==!1),this.updateNavArrows(),this.fillMonths();var g=i(s,a-1,28,0,0,0,0),w=r.getDaysInMonth(g.getUTCFullYear(),g.getUTCMonth());g.setUTCDate(w),g.setUTCDate(w-(g.getUTCDay()-this.weekStart+7)%7);var D=new Date(g);D.setUTCDate(D.getUTCDate()+42),D=D.valueOf();for(var y,T=[];g.valueOf()"),y="",g.getUTCFullYear()s||g.getUTCFullYear()==s&&g.getUTCMonth()>a)&&(y+=" new"),this.todayHighlight&&g.getUTCFullYear()==f.getFullYear()&&g.getUTCMonth()==f.getMonth()&&g.getUTCDate()==f.getDate()&&(y+=" today"),g.valueOf()==m&&(y+=" active"),(g.valueOf()+864e5<=this.startDate||g.valueOf()>this.endDate||-1!==e.inArray(g.getUTCDay(),this.daysOfWeekDisabled)||-1!==e.inArray(g.toDateString(),this.datesDisabled))&&(y+=" disabled"),T.push(''+g.getUTCDate()+""),g.getUTCDay()==this.weekEnd&&T.push(""),g.setUTCDate(g.getUTCDate()+1);this.picker.find(".datetimepicker-days tbody").empty().append(T.join("")),T=[];for(var M="",b="",C="",k=this.hoursDisabled||[],U=0;24>U;U++)if(-1===k.indexOf(U)){var V=i(s,a,n,U);y="",V.valueOf()+36e5<=this.startDate||V.valueOf()>this.endDate?y+=" disabled":h==U&&(y+=" active"),this.showMeridian&&2==o[this.language].meridiem.length?(b=12>U?o[this.language].meridiem[0]:o[this.language].meridiem[1],b!=C&&(""!=C&&T.push(""),T.push('
'+b.toUpperCase()+"")),C=b,M=U%12?U%12:12,T.push('U?"am":"pm")+'">'+M+""),23==U&&T.push("
")):(M=U+":00",T.push(''+M+""))}this.picker.find(".datetimepicker-hours td").html(T.join("")),T=[],M="",b="",C="";for(var x=this.minutesDisabled||[],U=0;60>U;U+=this.minuteStep)if(-1===x.indexOf(U)){var V=i(s,a,n,h,U,0);y="",V.valueOf()this.endDate?y+=" disabled":Math.floor(d/this.minuteStep)==Math.floor(U/this.minuteStep)&&(y+=" active"),this.showMeridian&&2==o[this.language].meridiem.length?(b=12>h?o[this.language].meridiem[0]:o[this.language].meridiem[1],b!=C&&(""!=C&&T.push(""),T.push('
'+b.toUpperCase()+"")),C=b,M=h%12?h%12:12,T.push(''+M+":"+(10>U?"0"+U:U)+""),59==U&&T.push("
")):(M=U+":00",T.push(''+h+":"+(10>U?"0"+U:U)+""))}this.picker.find(".datetimepicker-minutes td").html(T.join(""));var S=this.date.getUTCFullYear(),F=this.setTitle(".datetimepicker-months",s).end().find("span").removeClass("active");if(S==s){var H=F.length-12;F.eq(this.date.getUTCMonth()+H).addClass("active")}(l>s||s>u)&&F.addClass("disabled"),s==l&&F.slice(0,c).addClass("disabled"),s==u&&F.slice(p).addClass("disabled"),T="",s=10*parseInt(s/10,10);var N=this.setTitle(".datetimepicker-years",s+"-"+(s+9)).end().find("td");s-=1;for(var U=-1;11>U;U++)T+='s||s>u?" disabled":"")+'">'+s+"",s+=1;N.html(T),this.place()}},updateNavArrows:function(){var e=new Date(this.viewDate),t=e.getUTCFullYear(),i=e.getUTCMonth(),s=e.getUTCDate(),a=e.getUTCHours();switch(this.viewMode){case 0:this.startDate!==-(1/0)&&t<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()&&s<=this.startDate.getUTCDate()&&a<=this.startDate.getUTCHours()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&t>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()&&s>=this.endDate.getUTCDate()&&a>=this.endDate.getUTCHours()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:this.startDate!==-(1/0)&&t<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()&&s<=this.startDate.getUTCDate()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&t>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()&&s>=this.endDate.getUTCDate()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 2:this.startDate!==-(1/0)&&t<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&t>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 3:case 4:this.startDate!==-(1/0)&&t<=this.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&t>=this.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}},mousewheel:function(t){if(t.preventDefault(),t.stopPropagation(),!this.wheelPause){this.wheelPause=!0;var i=t.originalEvent,s=i.wheelDelta,a=s>0?1:0===s?0:-1;this.wheelViewModeNavigationInverseDirection&&(a=-a),this.showMode(a),setTimeout(e.proxy(function(){this.wheelPause=!1},this),this.wheelViewModeNavigationDelay)}},click:function(t){t.stopPropagation(),t.preventDefault();var s=e(t.target).closest("span, td, th, legend");if(s.is("."+this.icontype)&&(s=e(s).parent().closest("span, td, th, legend")),1==s.length){if(s.is(".disabled"))return void this.element.trigger({type:"outOfRange",date:this.viewDate,startDate:this.startDate,endDate:this.endDate});switch(s[0].nodeName.toLowerCase()){case"th":switch(s[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var a=r.modes[this.viewMode].navStep*("prev"==s[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,a);break;case 1:this.viewDate=this.moveDate(this.viewDate,a);break;case 2:this.viewDate=this.moveMonth(this.viewDate,a);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,a)}this.fill(),this.element.trigger({type:s[0].className+":"+this.convertViewModeText(this.viewMode),date:this.viewDate,startDate:this.startDate,endDate:this.endDate});break;case"clear":this.reset(),this.autoclose&&this.hide();break;case"today":var n=new Date;n=i(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),0),nthis.endDate&&(n=this.endDate),this.viewMode=this.startViewMode,this.showMode(0),this._setDate(n),this.fill(),this.autoclose&&this.hide()}break;case"span":if(!s.is(".disabled")){var h=this.viewDate.getUTCFullYear(),o=this.viewDate.getUTCMonth(),d=this.viewDate.getUTCDate(),l=this.viewDate.getUTCHours(),c=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();if(s.is(".month")?(this.viewDate.setUTCDate(1),o=s.parent().find("span").index(s),d=this.viewDate.getUTCDate(),this.viewDate.setUTCMonth(o),this.element.trigger({type:"changeMonth",date:this.viewDate}),this.viewSelect>=3&&this._setDate(i(h,o,d,l,c,u,0))):s.is(".year")?(this.viewDate.setUTCDate(1),h=parseInt(s.text(),10)||0,this.viewDate.setUTCFullYear(h),this.element.trigger({type:"changeYear",date:this.viewDate}),this.viewSelect>=4&&this._setDate(i(h,o,d,l,c,u,0))):s.is(".hour")?(l=parseInt(s.text(),10)||0,(s.hasClass("hour_am")||s.hasClass("hour_pm"))&&(12==l&&s.hasClass("hour_am")?l=0:12!=l&&s.hasClass("hour_pm")&&(l+=12)),this.viewDate.setUTCHours(l),this.element.trigger({type:"changeHour",date:this.viewDate}),this.viewSelect>=1&&this._setDate(i(h,o,d,l,c,u,0))):s.is(".minute")&&(c=parseInt(s.text().substr(s.text().indexOf(":")+1),10)||0,this.viewDate.setUTCMinutes(c),this.element.trigger({type:"changeMinute",date:this.viewDate}),this.viewSelect>=0&&this._setDate(i(h,o,d,l,c,u,0))),0!=this.viewMode){var p=this.viewMode;this.showMode(-1),this.fill(),p==this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide()}break;case"td":if(s.is(".day")&&!s.is(".disabled")){var d=parseInt(s.text(),10)||1,h=this.viewDate.getUTCFullYear(),o=this.viewDate.getUTCMonth(),l=this.viewDate.getUTCHours(),c=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();s.is(".old")?0===o?(o=11,h-=1):o-=1:s.is(".new")&&(11==o?(o=0,h+=1):o+=1),this.viewDate.setUTCFullYear(h),this.viewDate.setUTCMonth(o,d),this.element.trigger({type:"changeDay",date:this.viewDate}),this.viewSelect>=2&&this._setDate(i(h,o,d,l,c,u,0))}var p=this.viewMode;this.showMode(-1),this.fill(),p==this.viewMode&&this.autoclose&&this.hide()}}},_setDate:function(e,t){t&&"date"!=t||(this.date=e),t&&"view"!=t||(this.viewDate=e),this.fill(),this.setValue();var i;this.isInput?i=this.element:this.component&&(i=this.element.find("input")),i&&(i.change(),this.autoclose&&(!t||"date"==t)),this.element.trigger({type:"changeDate",date:this.getDate()}),null==e&&(this.date=this.viewDate)},moveMinute:function(e,t){if(!t)return e;var i=new Date(e.valueOf());return i.setUTCMinutes(i.getUTCMinutes()+t*this.minuteStep),i},moveHour:function(e,t){if(!t)return e;var i=new Date(e.valueOf());return i.setUTCHours(i.getUTCHours()+t),i},moveDate:function(e,t){if(!t)return e;var i=new Date(e.valueOf());return i.setUTCDate(i.getUTCDate()+t),i},moveMonth:function(e,t){if(!t)return e;var i,s,a=new Date(e.valueOf()),n=a.getUTCDate(),h=a.getUTCMonth(),o=Math.abs(t);if(t=t>0?1:-1,1==o)s=-1==t?function(){return a.getUTCMonth()==h}:function(){return a.getUTCMonth()!=i},i=h+t,a.setUTCMonth(i),(0>i||i>11)&&(i=(i+12)%12);else{for(var r=0;o>r;r++)a=this.moveMonth(a,t);i=a.getUTCMonth(),a.setUTCDate(n),s=function(){return i!=a.getUTCMonth()}}for(;s();)a.setUTCDate(--n),a.setUTCMonth(i);return a},moveYear:function(e,t){return this.moveMonth(e,12*t)},dateWithinRange:function(e){return e>=this.startDate&&e<=this.endDate},keydown:function(e){if(this.picker.is(":not(:visible)"))return void(27==e.keyCode&&this.show());var t,i,s,a=!1;switch(e.keyCode){case 27:this.hide(),e.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation)break;t=37==e.keyCode?-1:1,viewMode=this.viewMode,e.ctrlKey?viewMode+=2:e.shiftKey&&(viewMode+=1),4==viewMode?(i=this.moveYear(this.date,t),s=this.moveYear(this.viewDate,t)):3==viewMode?(i=this.moveMonth(this.date,t),s=this.moveMonth(this.viewDate,t)):2==viewMode?(i=this.moveDate(this.date,t),s=this.moveDate(this.viewDate,t)):1==viewMode?(i=this.moveHour(this.date,t),s=this.moveHour(this.viewDate,t)):0==viewMode&&(i=this.moveMinute(this.date,t),s=this.moveMinute(this.viewDate,t)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),e.preventDefault(),a=!0);break;case 38:case 40:if(!this.keyboardNavigation)break;t=38==e.keyCode?-1:1,viewMode=this.viewMode,e.ctrlKey?viewMode+=2:e.shiftKey&&(viewMode+=1),4==viewMode?(i=this.moveYear(this.date,t),s=this.moveYear(this.viewDate,t)):3==viewMode?(i=this.moveMonth(this.date,t),s=this.moveMonth(this.viewDate,t)):2==viewMode?(i=this.moveDate(this.date,7*t),s=this.moveDate(this.viewDate,7*t)):1==viewMode?this.showMeridian?(i=this.moveHour(this.date,6*t),s=this.moveHour(this.viewDate,6*t)):(i=this.moveHour(this.date,4*t),s=this.moveHour(this.viewDate,4*t)):0==viewMode&&(i=this.moveMinute(this.date,4*t),s=this.moveMinute(this.viewDate,4*t)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),e.preventDefault(),a=!0);break;case 13:if(0!=this.viewMode){var n=this.viewMode;this.showMode(-1),this.fill(),n==this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide();e.preventDefault();break;case 9:this.hide()}if(a){var h;this.isInput?h=this.element:this.component&&(h=this.element.find("input")),h&&h.change(),this.element.trigger({type:"changeDate",date:this.getDate()})}},showMode:function(e){if(e){var t=Math.max(0,Math.min(r.modes.length-1,this.viewMode+e));t>=this.minView&&t<=this.maxView&&(this.element.trigger({type:"changeMode",date:this.viewDate,oldViewMode:this.viewMode,newViewMode:t}),this.viewMode=t)}this.picker.find(">div").hide().filter(".datetimepicker-"+r.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()},reset:function(){this._setDate(null,"date")},convertViewModeText:function(e){switch(e){case 4:return"decade";case 3:return"year";case 2:return"month";case 1:return"day";case 0:return"hour"}}};var h=e.fn.datetimepicker;e.fn.datetimepicker=function(i){var s=Array.apply(null,arguments);s.shift();var a;return this.each(function(){var h=e(this),o=h.data("datetimepicker"),r="object"==typeof i&&i;return o||h.data("datetimepicker",o=new n(this,e.extend({},e.fn.datetimepicker.defaults,r))),"string"==typeof i&&"function"==typeof o[i]&&(a=o[i].apply(o,s),a!==t)?!1:void 0}),a!==t?a:this},e.fn.datetimepicker.defaults={},e.fn.datetimepicker.Constructor=n;var o=e.fn.datetimepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["am","pm"],suffix:["st","nd","rd","th"],today:"Today",clear:"Clear"}},r={modes:[{clsName:"minutes",navFnc:"Hours",navStep:1},{clsName:"hours",navFnc:"Date",navStep:1},{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(e){return e%4===0&&e%100!==0||e%400===0},getDaysInMonth:function(e,t){return[31,r.isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},getDefaultFormat:function(e,t){if("standard"==e)return"input"==t?"yyyy-mm-dd hh:ii":"yyyy-mm-dd hh:ii:ss";if("php"==e)return"input"==t?"Y-m-d H:i":"Y-m-d H:i:s";throw new Error("Invalid format type.")},validParts:function(e){if("standard"==e)return/t|hh?|HH?|p|P|z|Z|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g;if("php"==e)return/[dDjlNwzFmMnStyYaABgGhHis]/g;throw new Error("Invalid format type.")},nonpunctuation:/[^ -\/:-@\[-`{-~\t\n\rTZ]+/g,parseFormat:function(e,t){var i=e.replace(this.validParts(t),"\x00").split("\x00"),s=e.match(this.validParts(t));if(!i||!i.length||!s||0==s.length)throw new Error("Invalid date format.");return{separators:i,parts:s}},parseDate:function(t,s,a,h,r){if(t instanceof Date){var d=new Date(t.valueOf()-6e4*t.getTimezoneOffset());return d.setMilliseconds(0),d}if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(t)&&(s=this.parseFormat("yyyy-mm-dd",h)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(t)&&(s=this.parseFormat("yyyy-mm-dd hh:ii",h)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(t)&&(s=this.parseFormat("yyyy-mm-dd hh:ii:ss",h)),/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(t)){var l,c,u=/([-+]\d+)([dmwy])/,p=t.match(/([-+]\d+)([dmwy])/g);t=new Date;for(var m=0;mt;)t+=12;for(t%=12,e.setUTCMonth(t);e.getUTCMonth()!=t;){if(isNaN(e.getUTCMonth()))return e;e.setUTCDate(e.getUTCDate()-1)}return e},d:function(e,t){return e.setUTCDate(t)},p:function(e,t){return e.setUTCHours(1==t?e.getUTCHours()+12:e.getUTCHours())},z:function(){return r}};if(D.M=D.MM=D.mm=D.m,D.dd=D.d,D.P=D.p,D.Z=D.z,t=i(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()),p.length==s.parts.length){for(var m=0,y=s.parts.length;y>m;m++){if(f=parseInt(p[m],10),l=s.parts[m],isNaN(f))switch(l){case"MM":v=e(o[a].months).filter(function(){var e=this.slice(0,p[m].length),t=p[m].slice(0,e.length);return e==t}),f=e.inArray(v[0],o[a].months)+1;break;case"M":v=e(o[a].monthsShort).filter(function(){var e=this.slice(0,p[m].length),t=p[m].slice(0,e.length);return e.toLowerCase()==t.toLowerCase(); +}),f=e.inArray(v[0],o[a].monthsShort)+1;break;case"p":case"P":f=e.inArray(p[m].toLowerCase(),o[a].meridiem);break;case"z":case"Z":}g[l]=f}for(var T,m=0;ml;l++)d.length&&t.push(d.shift()),t.push(h[i.parts[l]]);return d.length&&t.push(d.shift()),t.join("")},convertViewMode:function(e){switch(e){case 4:case"decade":e=4;break;case 3:case"year":e=3;break;case 2:case"month":e=2;break;case 1:case"day":e=1;break;case 0:case"hour":e=0}return e},headTemplate:'',headTemplateV3:' ',contTemplate:'',footTemplate:''};r.template='
'+r.headTemplate+r.contTemplate+r.footTemplate+'
'+r.headTemplate+r.contTemplate+r.footTemplate+'
'+r.headTemplate+""+r.footTemplate+'
'+r.headTemplate+r.contTemplate+r.footTemplate+'
'+r.headTemplate+r.contTemplate+r.footTemplate+"
",r.templateV3='
'+r.headTemplateV3+r.contTemplate+r.footTemplate+'
'+r.headTemplateV3+r.contTemplate+r.footTemplate+'
'+r.headTemplateV3+""+r.footTemplate+'
'+r.headTemplateV3+r.contTemplate+r.footTemplate+'
'+r.headTemplateV3+r.contTemplate+r.footTemplate+"
",e.fn.datetimepicker.DPGlobal=r,e.fn.datetimepicker.noConflict=function(){return e.fn.datetimepicker=h,this},e(document).on("focus.datetimepicker.data-api click.datetimepicker.data-api",'[data-provide="datetimepicker"]',function(t){var i=e(this);i.data("datetimepicker")||(t.preventDefault(),i.datetimepicker("show"))}),e(function(){e('[data-provide="datetimepicker-inline"]').datetimepicker()})}); \ No newline at end of file