From ba53eb498658a5b03696f32e9abafc9a35128c79 Mon Sep 17 00:00:00 2001 From: Christopher Lassen Date: Mon, 12 Oct 2020 11:55:34 +0200 Subject: [PATCH] New build --- build/jquery.datetimepicker.full.js | 129 ++++++++++++++---------- build/jquery.datetimepicker.full.min.js | 2 +- build/jquery.datetimepicker.min.js | 2 +- 3 files changed, 78 insertions(+), 55 deletions(-) diff --git a/build/jquery.datetimepicker.full.js b/build/jquery.datetimepicker.full.js index bc17170..96f86e5 100644 --- a/build/jquery.datetimepicker.full.js +++ b/build/jquery.datetimepicker.full.js @@ -1,13 +1,16 @@ -/*! - * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2016 - * @version 1.3.4 - * - * Date formatter utility library that allows formatting date/time variables or Date objects using PHP DateTime format. - * @see http://php.net/manual/en/function.date.php - * - * For more JQuery plugins visit http://plugins.krajee.com - * For more Yii related demos visit http://demos.krajee.com - */var DateFormatter;!function(){"use strict";var t,e,r,n,a,u,i;u=864e5,i=3600,t=function(t,e){return"string"==typeof t&&"string"==typeof e&&t.toLowerCase()===e.toLowerCase()},e=function(t,r,n){var a=n||"0",u=t.toString();return u.lengths?"20":"19")+i):s,g=!0;break;case"m":case"n":case"M":case"F":if(isNaN(s)){if(o=d.getMonth(i),!(o>0))return null;y.month=o}else{if(!(s>=1&&12>=s))return null;y.month=s}g=!0;break;case"d":case"j":if(!(s>=1&&31>=s))return null;y.day=s,g=!0;break;case"g":case"h":if(c=n.indexOf("a")>-1?n.indexOf("a"):n.indexOf("A")>-1?n.indexOf("A"):-1,h=a[c],c>-1)f=t(h,p.meridiem[0])?0:t(h,p.meridiem[1])?12:-1,s>=1&&12>=s&&f>-1?y.hour=s+f-1:s>=0&&23>=s&&(y.hour=s);else{if(!(s>=0&&23>=s))return null;y.hour=s}m=!0;break;case"G":case"H":if(!(s>=0&&23>=s))return null;y.hour=s,m=!0;break;case"i":if(!(s>=0&&59>=s))return null;y.min=s,m=!0;break;case"s":if(!(s>=0&&59>=s))return null;y.sec=s,m=!0}if(g===!0&&y.year&&y.month&&y.day)y.date=new Date(y.year,y.month-1,y.day,y.hour,y.min,y.sec,0);else{if(m!==!0)return null;y.date=new Date(0,0,0,y.hour,y.min,y.sec,0)}return y.date},guessDate:function(t,e){if("string"!=typeof t)return t;var r,n,a,u,i,s,o=this,c=t.replace(o.separators,"\x00").split("\x00"),f=/^[djmn]/g,l=e.match(o.validParts),h=new Date,d=0;if(!f.test(l[0]))return t;for(a=0;ar?r:4,n=parseInt(4>r?n.toString().substr(0,4-r)+i:i.substr(0,4)),!n)return null;h.setFullYear(n);break;case 3:h.setHours(s);break;case 4:h.setMinutes(s);break;case 5:h.setSeconds(s)}u=i.substr(d),u.length>0&&c.splice(a+1,0,u)}return h},parseFormat:function(t,r){var n,a=this,s=a.dateSettings,o=/\\?(.?)/gi,c=function(t,e){return n[t]?n[t]():e};return n={d:function(){return e(n.j(),2)},D:function(){return s.daysShort[n.w()]},j:function(){return r.getDate()},l:function(){return s.days[n.w()]},N:function(){return n.w()||7},w:function(){return r.getDay()},z:function(){var t=new Date(n.Y(),n.n()-1,n.j()),e=new Date(n.Y(),0,1);return Math.round((t-e)/u)},W:function(){var t=new Date(n.Y(),n.n()-1,n.j()-n.N()+3),r=new Date(t.getFullYear(),0,4);return e(1+Math.round((t-r)/u/7),2)},F:function(){return s.months[r.getMonth()]},m:function(){return e(n.n(),2)},M:function(){return s.monthsShort[r.getMonth()]},n:function(){return r.getMonth()+1},t:function(){return new Date(n.Y(),n.n(),0).getDate()},L:function(){var t=n.Y();return t%4===0&&t%100!==0||t%400===0?1:0},o:function(){var t=n.n(),e=n.W(),r=n.Y();return r+(12===t&&9>e?1:1===t&&e>9?-1:0)},Y:function(){return r.getFullYear()},y:function(){return n.Y().toString().slice(-2)},a:function(){return n.A().toLowerCase()},A:function(){var t=n.G()<12?0:1;return s.meridiem[t]},B:function(){var t=r.getUTCHours()*i,n=60*r.getUTCMinutes(),a=r.getUTCSeconds();return e(Math.floor((t+n+a+i)/86.4)%1e3,3)},g:function(){return n.G()%12||12},G:function(){return r.getHours()},h:function(){return e(n.g(),2)},H:function(){return e(n.G(),2)},i:function(){return e(r.getMinutes(),2)},s:function(){return e(r.getSeconds(),2)},u:function(){return e(1e3*r.getMilliseconds(),6)},e:function(){var t=/\((.*)\)/.exec(String(r))[1];return t||"Coordinated Universal Time"},I:function(){var t=new Date(n.Y(),0),e=Date.UTC(n.Y(),0),r=new Date(n.Y(),6),a=Date.UTC(n.Y(),6);return t-e!==r-a?1:0},O:function(){var t=r.getTimezoneOffset(),n=Math.abs(t);return(t>0?"-":"+")+e(100*Math.floor(n/60)+n%60,4)},P:function(){var t=n.O();return t.substr(0,3)+":"+t.substr(3,2)},T:function(){var t=(String(r).match(a.tzParts)||[""]).pop().replace(a.tzClip,"");return t||"UTC"},Z:function(){return 60*-r.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(o,c)},r:function(){return"D, d M Y H:i:s O".replace(o,c)},U:function(){return r.getTime()/1e3||0}},c(t,t)},formatDate:function(t,e){var r,n,a,u,i,s=this,o="",c="\\";if("string"==typeof t&&(t=s.parseDate(t,e),!t))return null;if(t instanceof Date){for(a=e.length,r=0;a>r;r++)i=e.charAt(r),"S"!==i&&i!==c&&(r>0&&e.charAt(r-1)===c?o+=i:(u=s.parseFormat(i,t),r!==a-1&&s.intParts.test(i)&&"S"===e.charAt(r+1)&&(n=parseInt(u)||0,u+=s.dateSettings.ordinal(n)),o+=u));return o}return""}}}(); +/*! + * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2020 + * @version 1.3.6 + * + * Date formatter utility library that allows formatting date/time variables or Date objects using PHP DateTime format. + * This library is a standalone javascript library and does not depend on other libraries or plugins like jQuery. The + * library also adds support for Universal Module Definition (UMD). + * + * @see http://php.net/manual/en/function.date.php + * + * For more JQuery plugins visit http://plugins.krajee.com + * For more Yii related demos visit http://demos.krajee.com + */!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():t.DateFormatter=e()}("undefined"!=typeof self?self:this,function(){var t,e;return e={DAY:864e5,HOUR:3600,defaults:{dateSettings:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],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"],ordinal:function(t){var e=t%10,n={1:"st",2:"nd",3:"rd"};return 1!==Math.floor(t%100/10)&&n[e]?n[e]:"th"}},separators:/[ \-+\/.:@]/g,validParts:/[dDjlNSwzWFmMntLoYyaABgGhHisueTIOPZcrU]/g,intParts:/[djwNzmnyYhHgGis]/g,tzParts:/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,tzClip:/[^-+\dA-Z]/g},getInt:function(t,e){return parseInt(t,e?e:10)},compare:function(t,e){return"string"==typeof t&&"string"==typeof e&&t.toLowerCase()===e.toLowerCase()},lpad:function(t,n,r){var a=t.toString();return r=r||"0",a.length=0;u--)"S"===r[u]&&r.splice(u,1);for(a=t.replace(g.separators,"\x00").split("\x00"),u=0;uo?"20":"19")+i):o,h=!0;break;case"m":case"n":case"M":case"F":if(isNaN(o)){if(s=g.getMonth(i),!(s>0))return null;y.month=s}else{if(!(o>=1&&12>=o))return null;y.month=o}h=!0;break;case"d":case"j":if(!(o>=1&&31>=o))return null;y.day=o,h=!0;break;case"g":case"h":if(c=r.indexOf("a")>-1?r.indexOf("a"):r.indexOf("A")>-1?r.indexOf("A"):-1,d=a[c],-1!==c)f=e.compare(d,p.meridiem[0])?0:e.compare(d,p.meridiem[1])?12:-1,o>=1&&12>=o&&-1!==f?y.hour=o%12===0?f:o+f:o>=0&&23>=o&&(y.hour=o);else{if(!(o>=0&&23>=o))return null;y.hour=o}m=!0;break;case"G":case"H":if(!(o>=0&&23>=o))return null;y.hour=o,m=!0;break;case"i":if(!(o>=0&&59>=o))return null;y.min=o,m=!0;break;case"s":if(!(o>=0&&59>=o))return null;y.sec=o,m=!0}if(h===!0){var D=y.year||0,v=y.month?y.month-1:0,S=y.day||1;y.date=new Date(D,v,S,y.hour,y.min,y.sec,0)}else{if(m!==!0)return null;y.date=new Date(0,0,0,y.hour,y.min,y.sec,0)}return y.date},guessDate:function(t,n){if("string"!=typeof t)return t;var r,a,u,i,o,s,c=this,f=t.replace(c.separators,"\x00").split("\x00"),l=/^[djmn]/g,d=n.match(c.validParts),g=new Date,h=0;if(!l.test(d[0]))return t;for(u=0;ur?r:4,a=e.getInt(4>r?a.toString().substr(0,4-r)+o:o.substr(0,4)),!a)return null;g.setFullYear(a);break;case 3:g.setHours(s);break;case 4:g.setMinutes(s);break;case 5:g.setSeconds(s)}i=o.substr(h),i.length>0&&f.splice(u+1,0,i)}return g},parseFormat:function(t,n){var r,a=this,u=a.dateSettings,i=/\\?(.?)/gi,o=function(t,e){return r[t]?r[t]():e};return r={d:function(){return e.lpad(r.j(),2)},D:function(){return u.daysShort[r.w()]},j:function(){return n.getDate()},l:function(){return u.days[r.w()]},N:function(){return r.w()||7},w:function(){return n.getDay()},z:function(){var t=new Date(r.Y(),r.n()-1,r.j()),n=new Date(r.Y(),0,1);return Math.round((t-n)/e.DAY)},W:function(){var t=new Date(r.Y(),r.n()-1,r.j()-r.N()+3),n=new Date(t.getFullYear(),0,4);return e.lpad(1+Math.round((t-n)/e.DAY/7),2)},F:function(){return u.months[n.getMonth()]},m:function(){return e.lpad(r.n(),2)},M:function(){return u.monthsShort[n.getMonth()]},n:function(){return n.getMonth()+1},t:function(){return new Date(r.Y(),r.n(),0).getDate()},L:function(){var t=r.Y();return t%4===0&&t%100!==0||t%400===0?1:0},o:function(){var t=r.n(),e=r.W(),n=r.Y();return n+(12===t&&9>e?1:1===t&&e>9?-1:0)},Y:function(){return n.getFullYear()},y:function(){return r.Y().toString().slice(-2)},a:function(){return r.A().toLowerCase()},A:function(){var t=r.G()<12?0:1;return u.meridiem[t]},B:function(){var t=n.getUTCHours()*e.HOUR,r=60*n.getUTCMinutes(),a=n.getUTCSeconds();return e.lpad(Math.floor((t+r+a+e.HOUR)/86.4)%1e3,3)},g:function(){return r.G()%12||12},G:function(){return n.getHours()},h:function(){return e.lpad(r.g(),2)},H:function(){return e.lpad(r.G(),2)},i:function(){return e.lpad(n.getMinutes(),2)},s:function(){return e.lpad(n.getSeconds(),2)},u:function(){return e.lpad(1e3*n.getMilliseconds(),6)},e:function(){var t=/\((.*)\)/.exec(String(n))[1];return t||"Coordinated Universal Time"},I:function(){var t=new Date(r.Y(),0),e=Date.UTC(r.Y(),0),n=new Date(r.Y(),6),a=Date.UTC(r.Y(),6);return t-e!==n-a?1:0},O:function(){var t=n.getTimezoneOffset(),r=Math.abs(t);return(t>0?"-":"+")+e.lpad(100*Math.floor(r/60)+r%60,4)},P:function(){var t=r.O();return t.substr(0,3)+":"+t.substr(3,2)},T:function(){var t=(String(n).match(a.tzParts)||[""]).pop().replace(a.tzClip,"");return t||"UTC"},Z:function(){return 60*-n.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(i,o)},r:function(){return"D, d M Y H:i:s O".replace(i,o)},U:function(){return n.getTime()/1e3||0}},o(t,t)},formatDate:function(t,n){var r,a,u,i,o,s=this,c="",f="\\";if("string"==typeof t&&(t=s.parseDate(t,n),!t))return null;if(t instanceof Date){for(u=n.length,r=0;u>r;r++)o=n.charAt(r),"S"!==o&&o!==f&&(r>0&&n.charAt(r-1)===f?c+=o:(i=s.parseFormat(o,t),r!==u-1&&s.intParts.test(o)&&"S"===n.charAt(r+1)&&(a=e.getInt(i)||0,i+=s.dateSettings.ordinal(a)),c+=i));return c}return""}},t}); /** * @preserve jQuery DateTimePicker * @homepage http://xdsoft.net/jqplugins/datetimepicker/ @@ -90,7 +93,7 @@ var datetimepickerFactory = function ($) { 'Січень', 'Лютий', 'Березень', 'Квітень', 'Травень', 'Червень', 'Липень', 'Серпень', 'Вересень', 'Жовтень', 'Листопад', 'Грудень' ], dayOfWeekShort: [ - "Ндл", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Сбт" + "Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб" ], dayOfWeek: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота"] }, @@ -541,6 +544,15 @@ var datetimepickerFactory = function ($) { "კვ", "ორშ", "სამშ", "ოთხ", "ხუთ", "პარ", "შაბ" ], dayOfWeek: ["კვირა", "ორშაბათი", "სამშაბათი", "ოთხშაბათი", "ხუთშაბათი", "პარასკევი", "შაბათი"] + }, + kk: { // Kazakh + months: [ + 'Қаңтар', 'Ақпан', 'Наурыз', 'Сәуір', 'Мамыр', 'Маусым', 'Шілде', 'Тамыз', 'Қыркүйек', 'Қазан', 'Қараша', 'Желтоқсан' + ], + dayOfWeekShort: [ + "Жк", "Дс", "Сс", "Ср", "Бс", "Жм", "Сб" + ], + dayOfWeek: ["Жексенбі", "Дүйсенбі", "Сейсенбі", "Сәрсенбі", "Бейсенбі", "Жұма", "Сенбі"] } }, @@ -677,7 +689,7 @@ var datetimepickerFactory = function ($) { parseDate: function (date, format) { if(isFormatStandard(format)){ return defaultDateHelper.parseDate(date, format); - } + } var d = moment(date, format); return d.isValid() ? d.toDate() : false; }, @@ -685,7 +697,7 @@ var datetimepickerFactory = function ($) { formatDate: function (date, format) { if(isFormatStandard(format)){ return defaultDateHelper.formatDate(date, format); - } + } return moment(date).format(format); }, @@ -718,7 +730,7 @@ var datetimepickerFactory = function ($) { if(typeof dateFormatter === 'string' && dateFormatters.hasOwnProperty(dateFormatter)){ var df = dateFormatters[dateFormatter]; $.extend(default_options, df.default_options); - dateHelper = df.formatter; + dateHelper = df.formatter; } else { dateHelper = dateFormatter; @@ -1123,11 +1135,11 @@ var datetimepickerFactory = function ($) { $(this).parent().parent().hide(); datetimepicker.trigger('xchange.xdsoft'); - if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) { + if (options.onChangeMonth && typeof options.onChangeMonth === 'function') { options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input')); } - if (year !== _xdsoft_datetime.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) { + if (year !== _xdsoft_datetime.currentTime.getFullYear() && typeof options.onChangeYear === 'function') { options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input')); } } @@ -1142,15 +1154,15 @@ var datetimepickerFactory = function ($) { options = $.extend(true, {}, options, _options); - if (_options.allowTimes && $.isArray(_options.allowTimes) && _options.allowTimes.length) { + if (_options.allowTimes && Array.isArray(_options.allowTimes) && _options.allowTimes.length) { options.allowTimes = $.extend(true, [], _options.allowTimes); } - if (_options.weekends && $.isArray(_options.weekends) && _options.weekends.length) { + if (_options.weekends && Array.isArray(_options.weekends) && _options.weekends.length) { options.weekends = $.extend(true, [], _options.weekends); } - if (_options.allowDates && $.isArray(_options.allowDates) && _options.allowDates.length) { + if (_options.allowDates && Array.isArray(_options.allowDates) && _options.allowDates.length) { options.allowDates = $.extend(true, [], _options.allowDates); } @@ -1158,7 +1170,7 @@ var datetimepickerFactory = function ($) { options.allowDateRe = new RegExp(_options.allowDateRe); } - if (_options.highlightedDates && $.isArray(_options.highlightedDates) && _options.highlightedDates.length) { + if (_options.highlightedDates && Array.isArray(_options.highlightedDates) && _options.highlightedDates.length) { $.each(_options.highlightedDates, function (index, value) { var splitData = $.map(value.split(','), $.trim), exDesc, @@ -1177,7 +1189,7 @@ var datetimepickerFactory = function ($) { options.highlightedDates = $.extend(true, [], highlightedDates); } - if (_options.highlightedPeriods && $.isArray(_options.highlightedPeriods) && _options.highlightedPeriods.length) { + if (_options.highlightedPeriods && Array.isArray(_options.highlightedPeriods) && _options.highlightedPeriods.length) { highlightedDates = $.extend(true, [], options.highlightedDates); $.each(_options.highlightedPeriods, function (index, value) { var dateTest, // start date @@ -1187,7 +1199,7 @@ var datetimepickerFactory = function ($) { keyDate, exDesc, style; - if ($.isArray(value)) { + if (Array.isArray(value)) { dateTest = value[0]; dateEnd = value[1]; desc = value[2]; @@ -1219,11 +1231,11 @@ var datetimepickerFactory = function ($) { options.highlightedDates = $.extend(true, [], highlightedDates); } - if (_options.disabledDates && $.isArray(_options.disabledDates) && _options.disabledDates.length) { + if (_options.disabledDates && Array.isArray(_options.disabledDates) && _options.disabledDates.length) { options.disabledDates = $.extend(true, [], _options.disabledDates); } - if (_options.disabledWeekDays && $.isArray(_options.disabledWeekDays) && _options.disabledWeekDays.length) { + if (_options.disabledWeekDays && Array.isArray(_options.disabledWeekDays) && _options.disabledWeekDays.length) { options.disabledWeekDays = $.extend(true, [], _options.disabledWeekDays); } @@ -1461,11 +1473,11 @@ var datetimepickerFactory = function ($) { ); _this.currentTime.setMonth(month); - if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) { + if (options.onChangeMonth && typeof options.onChangeMonth === 'function') { options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input')); } - if (year !== _this.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) { + if (year !== _this.currentTime.getFullYear() && typeof options.onChangeYear === 'function') { options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input')); } @@ -1491,7 +1503,7 @@ var datetimepickerFactory = function ($) { ) ); _this.currentTime.setMonth(month); - if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) { + if (options.onChangeMonth && typeof options.onChangeMonth === 'function') { options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input')); } datetimepicker.trigger('xchange.xdsoft'); @@ -1499,7 +1511,7 @@ var datetimepickerFactory = function ($) { }; _this.getWeekOfYear = function (datetime) { - if (options.onGetWeekOfYear && $.isFunction(options.onGetWeekOfYear)) { + if (options.onGetWeekOfYear && typeof options.onGetWeekOfYear === 'function') { var week = options.onGetWeekOfYear.call(datetimepicker, datetime); if (typeof week !== 'undefined') { return week; @@ -1646,7 +1658,18 @@ var datetimepickerFactory = function ($) { var pheight = timeboxparent[0].clientHeight, height = timebox[0].offsetHeight, top = Math.abs(parseInt(timebox.css('marginTop'), 10)); - if ($this.hasClass(options.next) && (height - pheight) - options.timeHeightInTimePicker >= top) { + /** + * Fixes a bug which happens if: + * top is < the timeHeightInTimePicker, it will cause the up arrow to stop working + * same for the down arrow if it's not exactly on the pixel + */ + if (top < options.timeHeightInTimePicker) { + top = options.timeHeightInTimePicker; + } else if ($this.hasClass(options.next) && (height - pheight) < top) { + timebox.css('marginTop', '-' + height + 'px'); + } + + if ($this.hasClass(options.next) && (height - pheight) > top) { timebox.css('marginTop', '-' + (top + options.timeHeightInTimePicker) + 'px'); } else if ($this.hasClass(options.prev) && top - options.timeHeightInTimePicker >= 0) { timebox.css('marginTop', '-' + (top - options.timeHeightInTimePicker) + 'px'); @@ -1685,7 +1708,7 @@ var datetimepickerFactory = function ($) { clearTimeout(xchangeTimer); xchangeTimer = setTimeout(function () { - if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null) { + if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null || isNaN(_xdsoft_datetime.currentTime.getTime())) { _xdsoft_datetime.currentTime = _xdsoft_datetime.now(); } @@ -1767,7 +1790,7 @@ var datetimepickerFactory = function ($) { classes.push('xdsoft_date'); - if (options.beforeShowDay && $.isFunction(options.beforeShowDay.call)) { + if (options.beforeShowDay && typeof options.beforeShowDay.call === 'function') { customDateSettings = options.beforeShowDay.call(datetimepicker, start); } else { customDateSettings = null; @@ -1778,26 +1801,26 @@ var datetimepickerFactory = function ($) { classes.push('xdsoft_disabled'); } } - + if(options.allowDates && options.allowDates.length>0){ if(options.allowDates.indexOf(dateHelper.formatDate(start, options.formatDate)) === -1){ classes.push('xdsoft_disabled'); } } - + var currentDay = ((start.getFullYear() * 12) + start.getMonth()) * 31 + start.getDate(); if ((maxDate !== false && start > maxDate) || (minDateTime !== false && start < minDateTime) || (minDate !== false && start < minDate) || (maxDateTime !== false && currentDay > maxDateTimeDay) || (customDateSettings && customDateSettings[0] === false)) { classes.push('xdsoft_disabled'); } - + if (options.disabledDates.indexOf(dateHelper.formatDate(start, options.formatDate)) !== -1) { classes.push('xdsoft_disabled'); } - + if (options.disabledWeekDays.indexOf(day) !== -1) { classes.push('xdsoft_disabled'); } - + if (input.is('[disabled]')) { classes.push('xdsoft_disabled'); } @@ -1828,7 +1851,7 @@ var datetimepickerFactory = function ($) { description = hDate.desc === undefined ? '' : hDate.desc; } - if (options.beforeShowDay && $.isFunction(options.beforeShowDay)) { + if (options.beforeShowDay && typeof options.beforeShowDay === 'function') { classes.push(options.beforeShowDay(start)); } @@ -1894,7 +1917,7 @@ var datetimepickerFactory = function ($) { line_time = function line_time(h, m) { var now = _xdsoft_datetime.now(), current_time, - isALlowTimesInit = options.allowTimes && $.isArray(options.allowTimes) && options.allowTimes.length; + isALlowTimesInit = options.allowTimes && Array.isArray(options.allowTimes) && options.allowTimes.length; now.setHours(h); h = parseInt(now.getHours(), 10); now.setMinutes(m); @@ -1925,7 +1948,7 @@ var datetimepickerFactory = function ($) { time += '
' + dateHelper.formatDate(now, options.formatTime) + '
'; }; - if (!options.allowTimes || !$.isArray(options.allowTimes) || !options.allowTimes.length) { + if (!options.allowTimes || !Array.isArray(options.allowTimes) || !options.allowTimes.length) { for (i = 0, j = 0; i < (options.hours12 ? 12 : 24); i += 1) { for (j = 0; j < 60; j += options.step) { var currentMinutesOfDay = i * 60 + j; @@ -2011,7 +2034,7 @@ var datetimepickerFactory = function ($) { input.val(_xdsoft_datetime.str()); - if (options.onSelectDate && $.isFunction(options.onSelectDate)) { + if (options.onSelectDate && typeof options.onSelectDate === 'function') { options.onSelectDate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent); } @@ -2051,7 +2074,7 @@ var datetimepickerFactory = function ($) { datetimepicker.data('input').val(_xdsoft_datetime.str()); - if (options.onSelectTime && $.isFunction(options.onSelectTime)) { + if (options.onSelectTime && typeof options.onSelectTime === 'function') { options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent); } datetimepicker.data('changed', true); @@ -2103,7 +2126,7 @@ var datetimepickerFactory = function ($) { datetimepicker .on('changedatetime.xdsoft', function (event) { - if (options.onChangeDateTime && $.isFunction(options.onChangeDateTime)) { + if (options.onChangeDateTime && typeof options.onChangeDateTime === 'function') { var $input = datetimepicker.data('input'); options.onChangeDateTime.call(datetimepicker, _xdsoft_datetime.currentTime, $input, event); delete options.value; @@ -2111,7 +2134,7 @@ var datetimepickerFactory = function ($) { } }) .on('generate.xdsoft', function () { - if (options.onGenerate && $.isFunction(options.onGenerate)) { + if (options.onGenerate && typeof options.onGenerate === 'function') { options.onGenerate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input')); } if (triggerAfterOpen) { @@ -2261,7 +2284,7 @@ var datetimepickerFactory = function ($) { datetimepicker .on('open.xdsoft', function (event) { var onShow = true; - if (options.onShow && $.isFunction(options.onShow)) { + if (options.onShow && typeof options.onShow === 'function') { onShow = options.onShow.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event); } if (onShow !== false) { @@ -2285,7 +2308,7 @@ var datetimepickerFactory = function ($) { .find('.xdsoft_month,.xdsoft_year') .find('.xdsoft_select') .hide(); - if (options.onClose && $.isFunction(options.onClose)) { + if (options.onClose && typeof options.onClose === 'function') { onClose = options.onClose.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event); } if (onClose !== false && !options.opened && !options.inline) { @@ -2401,7 +2424,7 @@ var datetimepickerFactory = function ($) { } } - if ($.type(options.mask) === 'string') { + if (typeof options.mask === 'string') { if (!isValidValue(options.mask, input.val())) { input.val(options.mask.replace(/[0-9]/g, '_')); setCaretPos(input[0], 0); @@ -2425,7 +2448,7 @@ var datetimepickerFactory = function ($) { var valueBeforeCursor = val.substr(0, pos); var valueAfterPaste = val.substr(pos + pastedData.length); - val = valueBeforeCursor + pastedData + valueAfterPaste; + val = valueBeforeCursor + pastedData + valueAfterPaste; pos += pastedData.length; if (isValidValue(options.mask, val)) { @@ -2451,7 +2474,7 @@ var datetimepickerFactory = function ($) { // only alow these characters if (((key >= KEY0 && key <= KEY9) || - (key >= _KEY0 && key <= _KEY9)) || + (key >= _KEY0 && key <= _KEY9)) || (key === BACKSPACE || key === DEL)) { // get char to insert which is new character or placeholder ('_') @@ -2482,7 +2505,7 @@ var datetimepickerFactory = function ($) { pos += (key === BACKSPACE && !hasSel) ? -1 : 1; } - + if (event.metaKey) { // cmd has been pressed pos = 0; hasSel = true; @@ -2494,7 +2517,7 @@ var datetimepickerFactory = function ($) { // if we have a selection length we will wipe out entire selection and replace with default template for that range var defaultBlank = options.mask.replace(/[0-9]/g, '_'); - var defaultBlankSelectionReplacement = defaultBlank.substr(pos, selLength); + var defaultBlankSelectionReplacement = defaultBlank.substr(pos, selLength); var selReplacementRemainder = defaultBlankSelectionReplacement.substr(1) // might be empty var valueBeforeSel = val.substr(0, pos); @@ -2634,7 +2657,7 @@ var datetimepickerFactory = function ($) { this.each(function () { var datetimepicker = $(this).data('xdsoft_datetimepicker'), $input; if (datetimepicker) { - if ($.type(opt) === 'string') { + if (typeof opt === 'string') { switch (opt) { case 'show': $(this).select().focus(); @@ -2661,7 +2684,7 @@ var datetimepickerFactory = function ($) { $input.trigger('blur.xdsoft'); break; default: - if (datetimepicker[opt] && $.isFunction(datetimepicker[opt])) { + if (datetimepicker[opt] && typeof datetimepicker[opt] === 'function') { result = datetimepicker[opt](opt2); } } @@ -2671,7 +2694,7 @@ var datetimepickerFactory = function ($) { } return 0; } - if ($.type(opt) !== 'string') { + if (typeof opt !== 'string') { if (!options.lazyInit || options.open || options.inline) { createDateTimePicker($(this)); } else { diff --git a/build/jquery.datetimepicker.full.min.js b/build/jquery.datetimepicker.full.min.js index 60c0e9c..85768bc 100644 --- a/build/jquery.datetimepicker.full.min.js +++ b/build/jquery.datetimepicker.full.min.js @@ -1 +1 @@ -var DateFormatter;!function(){"use strict";var D,s,r,a,n;D=function(e,t){return"string"==typeof e&&"string"==typeof t&&e.toLowerCase()===t.toLowerCase()},s=function(e,t,a){var n=a||"0",r=e.toString();return r.length'),u=L('
'),d.append(u),l.addClass("xdsoft_scroller_box").append(d),p=function(e){var t=a(e).y-r+g;t<0&&(t=0),t+u[0].offsetHeight>h&&(t=h-u[0].offsetHeight),l.trigger("scroll_element.xdsoft_scroller",[c?t/c:0])},u.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",function(e){i||l.trigger("resize_scroll.xdsoft_scroller",[y]),r=a(e).y,g=parseInt(u.css("marginTop"),10),h=d[0].offsetHeight,"mousedown"===e.type||"touchstart"===e.type?(D.ownerDocument&&L(D.ownerDocument.body).addClass("xdsoft_noselect"),L([D.ownerDocument.body,D.contentWindow]).on("touchend mouseup.xdsoft_scroller",function e(){L([D.ownerDocument.body,D.contentWindow]).off("touchend mouseup.xdsoft_scroller",e).off("mousemove.xdsoft_scroller",p).removeClass("xdsoft_noselect")}),L(D.ownerDocument.body).on("mousemove.xdsoft_scroller",p)):(t=!0,e.stopPropagation(),e.preventDefault())}).on("touchmove",function(e){t&&(e.preventDefault(),p(e))}).on("touchend touchcancel",function(){t=!1,g=0}),l.on("scroll_element.xdsoft_scroller",function(e,t){i||l.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=1'),e=L(''),g=L('
'),F=L('
'),C=L('
'),o=L('
'),u=o.find(".xdsoft_time_box").eq(0),P=L('
'),i=L(''),Y=L('
'),A=L('
'),s=!1,d=0;I.id&&_.attr("id",I.id),I.style&&_.attr("style",I.style),I.weeks&&_.addClass("xdsoft_showweeks"),I.rtl&&_.addClass("xdsoft_rtl"),_.addClass("xdsoft_"+I.theme),_.addClass(I.className),F.find(".xdsoft_month span").after(Y),F.find(".xdsoft_year span").after(A),F.find(".xdsoft_month,.xdsoft_year").on("touchstart mousedown.xdsoft",function(e){var t,a,n=L(this).find(".xdsoft_select").eq(0),r=0,o=0,i=n.is(":visible");for(F.find(".xdsoft_select").hide(),W.currentTime&&(r=W.currentTime[L(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),n[i?"hide":"show"](),t=n.find("div.xdsoft_option"),a=0;aI.touchMovedThreshold&&(this.touchMoved=!0)};function f(){var e,t=!1;return I.startDate?t=W.strToDate(I.startDate):(t=I.value||(O&&O.val&&O.val()?O.val():""))?(t=W.strToDateTime(t),I.yearOffset&&(t=new Date(t.getFullYear()-I.yearOffset,t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))):I.defaultDate&&(t=W.strToDateTime(I.defaultDate),I.defaultTime&&(e=W.strtotime(I.defaultTime),t.setHours(e.getHours()),t.setMinutes(e.getMinutes()))),t&&W.isValidDate(t)?_.data("changed",!0):t="",t||0}function c(m){var h=function(e,t){var a=e.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return new RegExp(a).test(t)},g=function(e,t){if(!(e="string"==typeof e||e instanceof String?m.ownerDocument.getElementById(e):e))return!1;if(e.createTextRange){var a=e.createTextRange();return a.collapse(!0),a.moveEnd("character",t),a.moveStart("character",t),a.select(),!0}return!!e.setSelectionRange&&(e.setSelectionRange(t,t),!0)};m.mask&&O.off("keydown.xdsoft"),!0===m.mask&&(E.formatMask?m.mask=E.formatMask(m.format):m.mask=m.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59")),"string"===L.type(m.mask)&&(h(m.mask,O.val())||(O.val(m.mask.replace(/[0-9]/g,"_")),g(O[0],0)),O.on("paste.xdsoft",function(e){var t=(e.clipboardData||e.originalEvent.clipboardData||window.clipboardData).getData("text"),a=this.value,n=this.selectionStart;return a=a.substr(0,n)+t+a.substr(n+t.length),n+=t.length,h(m.mask,a)?(this.value=a,g(this,n)):""===L.trim(a)?this.value=m.mask.replace(/[0-9]/g,"_"):O.trigger("error_input.xdsoft"),e.preventDefault(),!1}),O.on("keydown.xdsoft",function(e){var t,a=this.value,n=e.which,r=this.selectionStart,o=this.selectionEnd,i=r!==o;if(48<=n&&n<=57||96<=n&&n<=105||8===n||46===n){for(t=8===n||46===n?"_":String.fromCharCode(96<=n&&n<=105?n-48:n),8===n&&r&&!i&&(r-=1);;){var s=m.mask.substr(r,1),d=r=r?P.css("marginTop","-"+(r+I.timeHeightInTimePicker)+"px"):o.hasClass(I.prev)&&0<=r-I.timeHeightInTimePicker&&P.css("marginTop","-"+(r-I.timeHeightInTimePicker)+"px"),u.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(P[0].style.marginTop,10)/(n-a))]),d=10",I.weeks&&(l+=""),e=0;e<7;e+=1)l+=""+I.i18n[R].dayOfWeekShort[(e+I.dayOfWeekStart)%7]+"";for(l+="",l+="",!1!==I.maxDate&&(h=W.strToDate(I.maxDate),h=new Date(h.getFullYear(),h.getMonth(),h.getDate(),23,59,59,999)),!1!==I.minDate&&(g=W.strToDate(I.minDate),g=new Date(g.getFullYear(),g.getMonth(),g.getDate())),!1!==I.minDateTime&&(p=W.strToDate(I.minDateTime),p=new Date(p.getFullYear(),p.getMonth(),p.getDate(),p.getHours(),p.getMinutes(),p.getSeconds())),!1!==I.maxDateTime&&(D=W.strToDate(I.maxDateTime),D=new Date(D.getFullYear(),D.getMonth(),D.getDate(),D.getHours(),D.getMinutes(),D.getSeconds())),!1!==D&&(u=31*(12*D.getFullYear()+D.getMonth())+D.getDate());c",v=!1,I.weeks&&(l+=""+o+"")),l+='
'+n+"
",f.getDay()===I.dayOfWeekStartPrev&&(l+="",v=!0),f.setDate(n+1)}l+="",C.html(l),F.find(".xdsoft_label span").eq(0).text(I.i18n[R].months[W.currentTime.getMonth()]),F.find(".xdsoft_label span").eq(1).text(W.currentTime.getFullYear()+I.yearOffset),M=b="";var x=0;if(!1!==I.minTime){var T=W.strtotime(I.minTime);x=60*T.getHours()+T.getMinutes()}var S=1440;if(!1!==I.maxTime){T=W.strtotime(I.maxTime);S=60*T.getHours()+T.getMinutes()}if(!1!==I.minDateTime){T=W.strToDateTime(I.minDateTime);if(E.formatDate(W.currentTime,I.formatDate)===E.formatDate(T,I.formatDate)){var M=60*T.getHours()+T.getMinutes();x'+E.formatDate(n,I.formatTime)+""},I.allowTimes&&L.isArray(I.allowTimes)&&I.allowTimes.length)for(c=0;c'+(c+I.yearOffset)+"";for(A.children().eq(0).html(H),c=parseInt(I.monthStart,10),H="";c<=parseInt(I.monthEnd,10);c+=1)H+='
'+I.i18n[R].months[c]+"
";Y.children().eq(0).html(H),L(_).trigger("generate.xdsoft")},10),e.stopPropagation()}).on("afterOpen.xdsoft",function(){var e,t,a,n;I.timepicker&&(P.find(".xdsoft_current").length?e=".xdsoft_current":P.find(".xdsoft_init_time").length&&(e=".xdsoft_init_time"),e?(t=u[0].clientHeight,(a=P[0].offsetHeight)-t<(n=P.find(e).index()*I.timeHeightInTimePicker+1)&&(n=a-t),u.trigger("scroll_element.xdsoft_scroller",[parseInt(n,10)/(a-t)])):u.trigger("scroll_element.xdsoft_scroller",[0]))}),n=0,C.on("touchend click.xdsoft","td",function(e){e.stopPropagation(),n+=1;var t=L(this),a=W.currentTime;if(null==a&&(W.currentTime=W.now(),a=W.currentTime),t.hasClass("xdsoft_disabled"))return!1;a.setDate(1),a.setFullYear(t.data("year")),a.setMonth(t.data("month")),a.setDate(t.data("date")),_.trigger("select.xdsoft",[a]),O.val(W.str()),I.onSelectDate&&L.isFunction(I.onSelectDate)&&I.onSelectDate.call(_,W.currentTime,_.data("input"),e),_.data("changed",!0),_.trigger("xchange.xdsoft"),_.trigger("changedatetime.xdsoft"),(1f+c?(u="bottom",a=f+c-e.top):a-=c):a+_[0].offsetHeight>f+c&&(a=e.top-_[0].offsetHeight+1),a<0&&(a=0),n+t.offsetWidth>d&&(n=d-t.offsetWidth)),o=_[0],h(o,function(e){if("relative"===I.contentWindow.getComputedStyle(e).getPropertyValue("position")&&d>=e.offsetWidth)return n-=(d-e.offsetWidth)/2,!1}),l={position:r,left:I.insideParent?t.offsetLeft:n,top:"",bottom:""},I.insideParent?l[u]=t.offsetTop+t.offsetHeight:l[u]=a,_.css(l)},_.on("open.xdsoft",function(e){var t=!0;I.onShow&&L.isFunction(I.onShow)&&(t=I.onShow.call(_,W.currentTime,_.data("input"),e)),!1!==t&&(_.show(),r(),L(I.contentWindow).off("resize.xdsoft",r).on("resize.xdsoft",r),I.closeOnWithoutClick&&L([I.ownerDocument.body,I.contentWindow]).on("touchstart mousedown.xdsoft",function e(){_.trigger("close.xdsoft"),L([I.ownerDocument.body,I.contentWindow]).off("touchstart mousedown.xdsoft",e)}))}).on("close.xdsoft",function(e){var t=!0;F.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide(),I.onClose&&L.isFunction(I.onClose)&&(t=I.onClose.call(_,W.currentTime,_.data("input"),e)),!1===t||I.opened||I.inline||_.hide(),e.stopPropagation()}).on("toggle.xdsoft",function(){_.is(":visible")?_.trigger("close.xdsoft"):_.trigger("open.xdsoft")}).data("input",O),d=0,_.data("xdsoft_datetime",W),_.setOptions(I),W.setCurrentTime(f()),O.data("xdsoft_datetimepicker",_).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function(){O.is(":disabled")||O.data("xdsoft_datetimepicker").is(":visible")&&I.closeOnInputClick||I.openOnFocus&&(clearTimeout(d),d=setTimeout(function(){O.is(":disabled")||(s=!0,W.setCurrentTime(f(),!0),I.mask&&c(I),_.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(e){var t,a=e.which;return-1!==[D].indexOf(a)&&I.enterLikeTab?(t=L("input:visible,textarea:visible,button:visible,a:visible"),_.trigger("close.xdsoft"),t.eq(t.index(this)+1).focus(),!1):-1!==[T].indexOf(a)?(_.trigger("close.xdsoft"),!0):void 0}).on("blur.xdsoft",function(){_.trigger("close.xdsoft")})},r=function(e){var t=e.data("xdsoft_datetimepicker");t&&(t.data("xdsoft_datetime",null),t.remove(),e.data("xdsoft_datetimepicker",null).off(".xdsoft"),L(I.contentWindow).off("resize.xdsoft"),L([I.contentWindow,I.ownerDocument.body]).off("mousedown.xdsoft touchstart"),e.unmousewheel&&e.unmousewheel())},L(I.ownerDocument).off("keydown.xdsoftctrl keyup.xdsoftctrl").off("keydown.xdsoftcmd keyup.xdsoftcmd").on("keydown.xdsoftctrl",function(e){e.keyCode===p&&(N=!0)}).on("keyup.xdsoftctrl",function(e){e.keyCode===p&&(N=!1)}).on("keydown.xdsoftcmd",function(e){91===e.keyCode&&!0}).on("keyup.xdsoftcmd",function(e){91===e.keyCode&&!1}),this.each(function(){var t,e=L(this).data("xdsoft_datetimepicker");if(e){if("string"===L.type(H))switch(H){case"show":L(this).select().focus(),e.trigger("open.xdsoft");break;case"hide":e.trigger("close.xdsoft");break;case"toggle":e.trigger("toggle.xdsoft");break;case"destroy":r(L(this));break;case"reset":this.value=this.defaultValue,this.value&&e.data("xdsoft_datetime").isValidDate(E.parseDate(this.value,I.format))||e.data("changed",!1),e.data("xdsoft_datetime").setCurrentTime(this.value);break;case"validate":e.data("input").trigger("blur.xdsoft");break;default:e[H]&&L.isFunction(e[H])&&(o=e[H](a))}else e.setOptions(H);return 0}"string"!==L.type(H)&&(!I.lazyInit||I.open||I.inline?n(L(this)):(t=L(this)).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function e(){t.is(":disabled")||t.data("xdsoft_datetimepicker")||(clearTimeout(i),i=setTimeout(function(){t.data("xdsoft_datetimepicker")||n(t),t.off("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",e).trigger("open.xdsoft")},100))}))}),o},L.fn.datetimepicker.defaults=s};!function(e){"function"==typeof define&&define.amd?define(["jquery","jquery-mousewheel"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(datetimepickerFactory),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(c){var m,h,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],g=Array.prototype.slice;if(c.event.fixHooks)for(var a=e.length;a;)c.event.fixHooks[e[--a]]=c.event.mouseHooks;var p=c.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],n,!1);else this.onmousewheel=n;c.data(this,"mousewheel-line-height",p.getLineHeight(this)),c.data(this,"mousewheel-page-height",p.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],n,!1);else this.onmousewheel=null;c.removeData(this,"mousewheel-line-height"),c.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var t=c(e),a=t["offsetParent"in c.fn?"offsetParent":"parent"]();return a.length||(a=c("body")),parseInt(a.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(e){return c(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function n(e){var t,a=e||window.event,n=g.call(arguments,1),r=0,o=0,i=0,s=0,d=0;if((e=c.event.fix(a)).type="mousewheel","detail"in a&&(i=-1*a.detail),"wheelDelta"in a&&(i=a.wheelDelta),"wheelDeltaY"in a&&(i=a.wheelDeltaY),"wheelDeltaX"in a&&(o=-1*a.wheelDeltaX),"axis"in a&&a.axis===a.HORIZONTAL_AXIS&&(o=-1*i,i=0),r=0===i?o:i,"deltaY"in a&&(r=i=-1*a.deltaY),"deltaX"in a&&(o=a.deltaX,0===i&&(r=-1*o)),0!==i||0!==o){if(1===a.deltaMode){var u=c.data(this,"mousewheel-line-height");r*=u,i*=u,o*=u}else if(2===a.deltaMode){var l=c.data(this,"mousewheel-page-height");r*=l,i*=l,o*=l}if(t=Math.max(Math.abs(i),Math.abs(o)),(!h||t'),u=N('
'),d.append(u),l.addClass("xdsoft_scroller_box").append(d),a=function(e){e=t(e).y-r+p;e<0&&(e=0),e+u[0].offsetHeight>h&&(e=h-u[0].offsetHeight),l.trigger("scroll_element.xdsoft_scroller",[c?e/c:0])},u.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",function(e){i||l.trigger("resize_scroll.xdsoft_scroller",[D]),r=t(e).y,p=parseInt(u.css("marginTop"),10),h=d[0].offsetHeight,"mousedown"===e.type||"touchstart"===e.type?(y.ownerDocument&&N(y.ownerDocument.body).addClass("xdsoft_noselect"),N([y.ownerDocument.body,y.contentWindow]).on("touchend mouseup.xdsoft_scroller",function e(){N([y.ownerDocument.body,y.contentWindow]).off("touchend mouseup.xdsoft_scroller",e).off("mousemove.xdsoft_scroller",a).removeClass("xdsoft_noselect")}),N(y.ownerDocument.body).on("mousemove.xdsoft_scroller",a)):(g=!0,e.stopPropagation(),e.preventDefault())}).on("touchmove",function(e){g&&(e.preventDefault(),a(e))}).on("touchend touchcancel",function(){g=!1,p=0}),l.on("scroll_element.xdsoft_scroller",function(e,t){i||l.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=1'),e=N(''),m=N('
'),_=N('
'),C=N('
'),o=N('
'),l=o.find(".xdsoft_time_box").eq(0),P=N('
'),i=N(''),A=N('
'),Y=N('
'),s=!1,d=0;I.id&&W.attr("id",I.id),I.style&&W.attr("style",I.style),I.weeks&&W.addClass("xdsoft_showweeks"),I.rtl&&W.addClass("xdsoft_rtl"),W.addClass("xdsoft_"+I.theme),W.addClass(I.className),_.find(".xdsoft_month span").after(A),_.find(".xdsoft_year span").after(Y),_.find(".xdsoft_month,.xdsoft_year").on("touchstart mousedown.xdsoft",function(e){var t,a,n=N(this).find(".xdsoft_select").eq(0),r=0,o=0,i=n.is(":visible");for(_.find(".xdsoft_select").hide(),O.currentTime&&(r=O.currentTime[N(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),n[i?"hide":"show"](),t=n.find("div.xdsoft_option"),a=0;aI.touchMovedThreshold&&(this.touchMoved=!0)}function f(){var e,t=!1;return I.startDate?t=O.strToDate(I.startDate):(t=I.value||(w&&w.val&&w.val()?w.val():""))?(t=O.strToDateTime(t),I.yearOffset&&(t=new Date(t.getFullYear()-I.yearOffset,t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))):I.defaultDate&&(t=O.strToDateTime(I.defaultDate),I.defaultTime&&(e=O.strtotime(I.defaultTime),t.setHours(e.getHours()),t.setMinutes(e.getMinutes()))),t&&O.isValidDate(t)?W.data("changed",!0):t="",t||0}function h(c){function m(e,t){return e=e.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}"),new RegExp(e).test(t)}function h(e,t){if(e="string"==typeof e||e instanceof String?c.ownerDocument.getElementById(e):e){if(e.createTextRange){var a=e.createTextRange();return a.collapse(!0),a.moveEnd("character",t),a.moveStart("character",t),a.select(),1}return!!e.setSelectionRange&&(e.setSelectionRange(t,t),!0)}}c.mask&&w.off("keydown.xdsoft"),!0===c.mask&&(L.formatMask?c.mask=L.formatMask(c.format):c.mask=c.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59")),"string"==typeof c.mask&&(m(c.mask,w.val())||(w.val(c.mask.replace(/[0-9]/g,"_")),h(w[0],0)),w.on("paste.xdsoft",function(e){var t=(e.clipboardData||e.originalEvent.clipboardData||window.clipboardData).getData("text"),a=this.value,n=this.selectionStart,a=a.substr(0,n)+t+a.substr(n+t.length);return n+=t.length,m(c.mask,a)?(this.value=a,h(this,n)):""===N.trim(a)?this.value=c.mask.replace(/[0-9]/g,"_"):w.trigger("error_input.xdsoft"),e.preventDefault(),!1}),w.on("keydown.xdsoft",function(e){var t,a,n,r=this.value,o=e.which,i=this.selectionStart,s=this.selectionEnd,d=i!==s;if(48<=o&&o<=57||96<=o&&o<=105||8===o||46===o){for(t=8===o||46===o?"_":String.fromCharCode(96<=o&&o<=105?o-48:o),8===o&&i&&!d&&--i;;){var u=c.mask.substr(i,1),l=i",I.weeks&&(u+=""),e=0;e<7;e+=1)u+=""+I.i18n[E].dayOfWeekShort[(e+I.dayOfWeekStart)%7]+"";for(u+="",u+="",!1!==I.maxDate&&(m=O.strToDate(I.maxDate),m=new Date(m.getFullYear(),m.getMonth(),m.getDate(),23,59,59,999)),!1!==I.minDate&&(h=O.strToDate(I.minDate),h=new Date(h.getFullYear(),h.getMonth(),h.getDate())),!1!==I.minDateTime&&(g=O.strToDate(I.minDateTime),g=new Date(g.getFullYear(),g.getMonth(),g.getDate(),g.getHours(),g.getMinutes(),g.getSeconds())),!1!==I.maxDateTime&&(p=O.strToDate(I.maxDateTime),p=new Date(p.getFullYear(),p.getMonth(),p.getDate(),p.getHours(),p.getMinutes(),p.getSeconds())),!1!==p&&(d=31*(12*p.getFullYear()+p.getMonth())+p.getDate());f"+r+"")),u+='
'+a+"
",l.getDay()===I.dayOfWeekStartPrev&&(u+="",D=!0),l.setDate(a+1)}u+="",C.html(u),_.find(".xdsoft_label span").eq(0).text(I.i18n[E].months[O.currentTime.getMonth()]),_.find(".xdsoft_label span").eq(1).text(O.currentTime.getFullYear()+I.yearOffset),T=v="";var b=0;!1!==I.minTime&&(b=60*(x=O.strtotime(I.minTime)).getHours()+x.getMinutes());var x,T,S=1440;if(!1!==I.maxTime&&(S=60*(x=O.strtotime(I.maxTime)).getHours()+x.getMinutes()),!1!==I.minDateTime&&(x=O.strToDateTime(I.minDateTime),L.formatDate(O.currentTime,I.formatDate)===L.formatDate(x,I.formatDate)&&(T=60*x.getHours()+x.getMinutes(),b'+L.formatDate(a,I.formatTime)+""},I.allowTimes&&Array.isArray(I.allowTimes)&&I.allowTimes.length)for(f=0;f'+(f+I.yearOffset)+"";for(Y.children().eq(0).html(F),f=parseInt(I.monthStart,10),F="";f<=parseInt(I.monthEnd,10);f+=1)F+='
'+I.i18n[E].months[f]+"
";A.children().eq(0).html(F),N(W).trigger("generate.xdsoft")},10),e.stopPropagation()}).on("afterOpen.xdsoft",function(){var e,t,a;I.timepicker&&(P.find(".xdsoft_current").length?a=".xdsoft_current":P.find(".xdsoft_init_time").length&&(a=".xdsoft_init_time"),a?(e=l[0].clientHeight,(t=P[0].offsetHeight)-e<(a=P.find(a).index()*I.timeHeightInTimePicker+1)&&(a=t-e),l.trigger("scroll_element.xdsoft_scroller",[parseInt(a,10)/(t-e)])):l.trigger("scroll_element.xdsoft_scroller",[0]))}),n=0,C.on("touchend click.xdsoft","td",function(e){e.stopPropagation(),n+=1;var t=N(this),a=O.currentTime;if(null==a&&(O.currentTime=O.now(),a=O.currentTime),t.hasClass("xdsoft_disabled"))return!1;a.setDate(1),a.setFullYear(t.data("year")),a.setMonth(t.data("month")),a.setDate(t.data("date")),W.trigger("select.xdsoft",[a]),w.val(O.str()),I.onSelectDate&&"function"==typeof I.onSelectDate&&I.onSelectDate.call(W,O.currentTime,W.data("input"),e),W.data("changed",!0),W.trigger("xchange.xdsoft"),W.trigger("changedatetime.xdsoft"),(1l+f?(o="bottom",i=l+f-n.top):i-=f):i+W[0].offsetHeight>l+f&&(i=n.top-W[0].offsetHeight+1),i<0&&(i=0),s+r.offsetWidth>u&&(s=u-r.offsetWidth)),n=W[0],c(n,function(e){if("relative"===I.contentWindow.getComputedStyle(e).getPropertyValue("position")&&u>=e.offsetWidth)return s-=(u-e.offsetWidth)/2,!1}),d={position:d,left:I.insideParent?r.offsetLeft:s,top:"",bottom:""},I.insideParent?d[o]=r.offsetTop+r.offsetHeight:d[o]=i,W.css(d)},W.on("open.xdsoft",function(e){var t=!0;I.onShow&&"function"==typeof I.onShow&&(t=I.onShow.call(W,O.currentTime,W.data("input"),e)),!1!==t&&(W.show(),r(),N(I.contentWindow).off("resize.xdsoft",r).on("resize.xdsoft",r),I.closeOnWithoutClick&&N([I.ownerDocument.body,I.contentWindow]).on("touchstart mousedown.xdsoft",function e(){W.trigger("close.xdsoft"),N([I.ownerDocument.body,I.contentWindow]).off("touchstart mousedown.xdsoft",e)}))}).on("close.xdsoft",function(e){var t=!0;_.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide(),I.onClose&&"function"==typeof I.onClose&&(t=I.onClose.call(W,O.currentTime,W.data("input"),e)),!1===t||I.opened||I.inline||W.hide(),e.stopPropagation()}).on("toggle.xdsoft",function(){W.is(":visible")?W.trigger("close.xdsoft"):W.trigger("open.xdsoft")}).data("input",w),d=0,W.data("xdsoft_datetime",O),W.setOptions(I),O.setCurrentTime(f()),w.data("xdsoft_datetimepicker",W).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function(){w.is(":disabled")||w.data("xdsoft_datetimepicker").is(":visible")&&I.closeOnInputClick||I.openOnFocus&&(clearTimeout(d),d=setTimeout(function(){w.is(":disabled")||(s=!0,O.setCurrentTime(f(),!0),I.mask&&h(I),W.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(e){var t=e.which;return-1!==[p].indexOf(t)&&I.enterLikeTab?(e=N("input:visible,textarea:visible,button:visible,a:visible"),W.trigger("close.xdsoft"),e.eq(e.index(this)+1).focus(),!1):-1!==[x].indexOf(t)?(W.trigger("close.xdsoft"),!0):void 0}).on("blur.xdsoft",function(){W.trigger("close.xdsoft")})},i=function(e){var t=e.data("xdsoft_datetimepicker");t&&(t.data("xdsoft_datetime",null),t.remove(),e.data("xdsoft_datetimepicker",null).off(".xdsoft"),N(I.contentWindow).off("resize.xdsoft"),N([I.contentWindow,I.ownerDocument.body]).off("mousedown.xdsoft touchstart"),e.unmousewheel&&e.unmousewheel())};return N(I.ownerDocument).off("keydown.xdsoftctrl keyup.xdsoftctrl").off("keydown.xdsoftcmd keyup.xdsoftcmd").on("keydown.xdsoftctrl",function(e){e.keyCode===g&&(z=!0)}).on("keyup.xdsoftctrl",function(e){e.keyCode===g&&(z=!1)}).on("keydown.xdsoftcmd",function(e){91===e.keyCode&&0}).on("keyup.xdsoftcmd",function(e){91===e.keyCode&&0}),this.each(function(){var t,e=N(this).data("xdsoft_datetimepicker");if(e){if("string"==typeof F)switch(F){case"show":N(this).select().focus(),e.trigger("open.xdsoft");break;case"hide":e.trigger("close.xdsoft");break;case"toggle":e.trigger("toggle.xdsoft");break;case"destroy":i(N(this));break;case"reset":this.value=this.defaultValue,this.value&&e.data("xdsoft_datetime").isValidDate(L.parseDate(this.value,I.format))||e.data("changed",!1),e.data("xdsoft_datetime").setCurrentTime(this.value);break;case"validate":e.data("input").trigger("blur.xdsoft");break;default:e[F]&&"function"==typeof e[F]&&(n=e[F](a))}else e.setOptions(F);return 0}"string"!=typeof F&&(!I.lazyInit||I.open||I.inline?o(N(this)):(t=N(this)).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function e(){t.is(":disabled")||t.data("xdsoft_datetimepicker")||(clearTimeout(r),r=setTimeout(function(){t.data("xdsoft_datetimepicker")||o(t),t.off("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",e).trigger("open.xdsoft")},100))}))}),n},N.fn.datetimepicker.defaults=s};!function(e){"function"==typeof define&&define.amd?define(["jquery","jquery-mousewheel"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(datetimepickerFactory),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(l){var f,c,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],m=Array.prototype.slice;if(l.event.fixHooks)for(var a=e.length;a;)l.event.fixHooks[e[--a]]=l.event.mouseHooks;var h=l.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],n,!1);else this.onmousewheel=n;l.data(this,"mousewheel-line-height",h.getLineHeight(this)),l.data(this,"mousewheel-page-height",h.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],n,!1);else this.onmousewheel=null;l.removeData(this,"mousewheel-line-height"),l.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var t=l(e),e=t["offsetParent"in l.fn?"offsetParent":"parent"]();return e.length||(e=l("body")),parseInt(e.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(e){return l(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function n(e){var t,a=e||window.event,n=m.call(arguments,1),r=0,o=0,i=0,s=0,d=0,u=0;if((e=l.event.fix(a)).type="mousewheel","detail"in a&&(i=-1*a.detail),"wheelDelta"in a&&(i=a.wheelDelta),"wheelDeltaY"in a&&(i=a.wheelDeltaY),"wheelDeltaX"in a&&(o=-1*a.wheelDeltaX),"axis"in a&&a.axis===a.HORIZONTAL_AXIS&&(o=-1*i,i=0),r=0===i?o:i,"deltaY"in a&&(r=i=-1*a.deltaY),"deltaX"in a&&(o=a.deltaX,0===i&&(r=-1*o)),0!==i||0!==o)return 1===a.deltaMode?(r*=t=l.data(this,"mousewheel-line-height"),i*=t,o*=t):2===a.deltaMode&&(r*=t=l.data(this,"mousewheel-page-height"),i*=t,o*=t),s=Math.max(Math.abs(i),Math.abs(o)),(!c||s'),u=L('
'),d.append(u),l.addClass("xdsoft_scroller_box").append(d),p=function(e){var t=a(e).y-r+g;t<0&&(t=0),t+u[0].offsetHeight>h&&(t=h-u[0].offsetHeight),l.trigger("scroll_element.xdsoft_scroller",[c?t/c:0])},u.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",function(e){i||l.trigger("resize_scroll.xdsoft_scroller",[y]),r=a(e).y,g=parseInt(u.css("marginTop"),10),h=d[0].offsetHeight,"mousedown"===e.type||"touchstart"===e.type?(D.ownerDocument&&L(D.ownerDocument.body).addClass("xdsoft_noselect"),L([D.ownerDocument.body,D.contentWindow]).on("touchend mouseup.xdsoft_scroller",function e(){L([D.ownerDocument.body,D.contentWindow]).off("touchend mouseup.xdsoft_scroller",e).off("mousemove.xdsoft_scroller",p).removeClass("xdsoft_noselect")}),L(D.ownerDocument.body).on("mousemove.xdsoft_scroller",p)):(t=!0,e.stopPropagation(),e.preventDefault())}).on("touchmove",function(e){t&&(e.preventDefault(),p(e))}).on("touchend touchcancel",function(){t=!1,g=0}),l.on("scroll_element.xdsoft_scroller",function(e,t){i||l.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=1'),e=L(''),g=L('
'),F=L('
'),C=L('
'),n=L('
'),u=n.find(".xdsoft_time_box").eq(0),P=L('
'),i=L(''),A=L('
'),Y=L('
'),s=!1,d=0;I.id&&_.attr("id",I.id),I.style&&_.attr("style",I.style),I.weeks&&_.addClass("xdsoft_showweeks"),I.rtl&&_.addClass("xdsoft_rtl"),_.addClass("xdsoft_"+I.theme),_.addClass(I.className),F.find(".xdsoft_month span").after(A),F.find(".xdsoft_year span").after(Y),F.find(".xdsoft_month,.xdsoft_year").on("touchstart mousedown.xdsoft",function(e){var t,a,o=L(this).find(".xdsoft_select").eq(0),r=0,n=0,i=o.is(":visible");for(F.find(".xdsoft_select").hide(),W.currentTime&&(r=W.currentTime[L(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),o[i?"hide":"show"](),t=o.find("div.xdsoft_option"),a=0;aI.touchMovedThreshold&&(this.touchMoved=!0)};function f(){var e,t=!1;return I.startDate?t=W.strToDate(I.startDate):(t=I.value||(w&&w.val&&w.val()?w.val():""))?(t=W.strToDateTime(t),I.yearOffset&&(t=new Date(t.getFullYear()-I.yearOffset,t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))):I.defaultDate&&(t=W.strToDateTime(I.defaultDate),I.defaultTime&&(e=W.strtotime(I.defaultTime),t.setHours(e.getHours()),t.setMinutes(e.getMinutes()))),t&&W.isValidDate(t)?_.data("changed",!0):t="",t||0}function c(m){var h=function(e,t){var a=e.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return new RegExp(a).test(t)},g=function(e,t){if(!(e="string"==typeof e||e instanceof String?m.ownerDocument.getElementById(e):e))return!1;if(e.createTextRange){var a=e.createTextRange();return a.collapse(!0),a.moveEnd("character",t),a.moveStart("character",t),a.select(),!0}return!!e.setSelectionRange&&(e.setSelectionRange(t,t),!0)};m.mask&&w.off("keydown.xdsoft"),!0===m.mask&&(E.formatMask?m.mask=E.formatMask(m.format):m.mask=m.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59")),"string"===L.type(m.mask)&&(h(m.mask,w.val())||(w.val(m.mask.replace(/[0-9]/g,"_")),g(w[0],0)),w.on("paste.xdsoft",function(e){var t=(e.clipboardData||e.originalEvent.clipboardData||window.clipboardData).getData("text"),a=this.value,o=this.selectionStart;return a=a.substr(0,o)+t+a.substr(o+t.length),o+=t.length,h(m.mask,a)?(this.value=a,g(this,o)):""===L.trim(a)?this.value=m.mask.replace(/[0-9]/g,"_"):w.trigger("error_input.xdsoft"),e.preventDefault(),!1}),w.on("keydown.xdsoft",function(e){var t,a=this.value,o=e.which,r=this.selectionStart,n=this.selectionEnd,i=r!==n;if(48<=o&&o<=57||96<=o&&o<=105||8===o||46===o){for(t=8===o||46===o?"_":String.fromCharCode(96<=o&&o<=105?o-48:o),8===o&&r&&!i&&(r-=1);;){var s=m.mask.substr(r,1),d=r=r?P.css("marginTop","-"+(r+I.timeHeightInTimePicker)+"px"):n.hasClass(I.prev)&&0<=r-I.timeHeightInTimePicker&&P.css("marginTop","-"+(r-I.timeHeightInTimePicker)+"px"),u.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(P[0].style.marginTop,10)/(o-a))]),d=10",I.weeks&&(l+=""),e=0;e<7;e+=1)l+=""+I.i18n[V].dayOfWeekShort[(e+I.dayOfWeekStart)%7]+"";for(l+="",l+="",!1!==I.maxDate&&(h=W.strToDate(I.maxDate),h=new Date(h.getFullYear(),h.getMonth(),h.getDate(),23,59,59,999)),!1!==I.minDate&&(g=W.strToDate(I.minDate),g=new Date(g.getFullYear(),g.getMonth(),g.getDate())),!1!==I.minDateTime&&(p=W.strToDate(I.minDateTime),p=new Date(p.getFullYear(),p.getMonth(),p.getDate(),p.getHours(),p.getMinutes(),p.getSeconds())),!1!==I.maxDateTime&&(D=W.strToDate(I.maxDateTime),D=new Date(D.getFullYear(),D.getMonth(),D.getDate(),D.getHours(),D.getMinutes(),D.getSeconds())),!1!==D&&(u=31*(12*D.getFullYear()+D.getMonth())+D.getDate());c",k=!1,I.weeks&&(l+=""+n+"")),l+='
'+o+"
",f.getDay()===I.dayOfWeekStartPrev&&(l+="",k=!0),f.setDate(o+1)}l+="",C.html(l),F.find(".xdsoft_label span").eq(0).text(I.i18n[V].months[W.currentTime.getMonth()]),F.find(".xdsoft_label span").eq(1).text(W.currentTime.getFullYear()+I.yearOffset),O=x="";var b=0;if(!1!==I.minTime){var T=W.strtotime(I.minTime);b=60*T.getHours()+T.getMinutes()}var S=1440;if(!1!==I.maxTime){T=W.strtotime(I.maxTime);S=60*T.getHours()+T.getMinutes()}if(!1!==I.minDateTime){T=W.strToDateTime(I.minDateTime);if(E.formatDate(W.currentTime,I.formatDate)===E.formatDate(T,I.formatDate)){var O=60*T.getHours()+T.getMinutes();b'+E.formatDate(o,I.formatTime)+""},I.allowTimes&&L.isArray(I.allowTimes)&&I.allowTimes.length)for(c=0;c'+(c+I.yearOffset)+"";for(Y.children().eq(0).html(j),c=parseInt(I.monthStart,10),j="";c<=parseInt(I.monthEnd,10);c+=1)j+='
'+I.i18n[V].months[c]+"
";A.children().eq(0).html(j),L(_).trigger("generate.xdsoft")},10),e.stopPropagation()}).on("afterOpen.xdsoft",function(){var e,t,a,o;I.timepicker&&(P.find(".xdsoft_current").length?e=".xdsoft_current":P.find(".xdsoft_init_time").length&&(e=".xdsoft_init_time"),e?(t=u[0].clientHeight,(a=P[0].offsetHeight)-t<(o=P.find(e).index()*I.timeHeightInTimePicker+1)&&(o=a-t),u.trigger("scroll_element.xdsoft_scroller",[parseInt(o,10)/(a-t)])):u.trigger("scroll_element.xdsoft_scroller",[0]))}),o=0,C.on("touchend click.xdsoft","td",function(e){e.stopPropagation(),o+=1;var t=L(this),a=W.currentTime;if(null==a&&(W.currentTime=W.now(),a=W.currentTime),t.hasClass("xdsoft_disabled"))return!1;a.setDate(1),a.setFullYear(t.data("year")),a.setMonth(t.data("month")),a.setDate(t.data("date")),_.trigger("select.xdsoft",[a]),w.val(W.str()),I.onSelectDate&&L.isFunction(I.onSelectDate)&&I.onSelectDate.call(_,W.currentTime,_.data("input"),e),_.data("changed",!0),_.trigger("xchange.xdsoft"),_.trigger("changedatetime.xdsoft"),(1f+c?(u="bottom",a=f+c-e.top):a-=c):a+_[0].offsetHeight>f+c&&(a=e.top-_[0].offsetHeight+1),a<0&&(a=0),o+t.offsetWidth>d&&(o=d-t.offsetWidth)),n=_[0],h(n,function(e){if("relative"===I.contentWindow.getComputedStyle(e).getPropertyValue("position")&&d>=e.offsetWidth)return o-=(d-e.offsetWidth)/2,!1}),l={position:r,left:I.insideParent?t.offsetLeft:o,top:"",bottom:""},I.insideParent?l[u]=t.offsetTop+t.offsetHeight:l[u]=a,_.css(l)},_.on("open.xdsoft",function(e){var t=!0;I.onShow&&L.isFunction(I.onShow)&&(t=I.onShow.call(_,W.currentTime,_.data("input"),e)),!1!==t&&(_.show(),r(),L(I.contentWindow).off("resize.xdsoft",r).on("resize.xdsoft",r),I.closeOnWithoutClick&&L([I.ownerDocument.body,I.contentWindow]).on("touchstart mousedown.xdsoft",function e(){_.trigger("close.xdsoft"),L([I.ownerDocument.body,I.contentWindow]).off("touchstart mousedown.xdsoft",e)}))}).on("close.xdsoft",function(e){var t=!0;F.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide(),I.onClose&&L.isFunction(I.onClose)&&(t=I.onClose.call(_,W.currentTime,_.data("input"),e)),!1===t||I.opened||I.inline||_.hide(),e.stopPropagation()}).on("toggle.xdsoft",function(){_.is(":visible")?_.trigger("close.xdsoft"):_.trigger("open.xdsoft")}).data("input",w),d=0,_.data("xdsoft_datetime",W),_.setOptions(I),W.setCurrentTime(f()),w.data("xdsoft_datetimepicker",_).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function(){w.is(":disabled")||w.data("xdsoft_datetimepicker").is(":visible")&&I.closeOnInputClick||I.openOnFocus&&(clearTimeout(d),d=setTimeout(function(){w.is(":disabled")||(s=!0,W.setCurrentTime(f(),!0),I.mask&&c(I),_.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(e){var t,a=e.which;return-1!==[D].indexOf(a)&&I.enterLikeTab?(t=L("input:visible,textarea:visible,button:visible,a:visible"),_.trigger("close.xdsoft"),t.eq(t.index(this)+1).focus(),!1):-1!==[T].indexOf(a)?(_.trigger("close.xdsoft"),!0):void 0}).on("blur.xdsoft",function(){_.trigger("close.xdsoft")})},r=function(e){var t=e.data("xdsoft_datetimepicker");t&&(t.data("xdsoft_datetime",null),t.remove(),e.data("xdsoft_datetimepicker",null).off(".xdsoft"),L(I.contentWindow).off("resize.xdsoft"),L([I.contentWindow,I.ownerDocument.body]).off("mousedown.xdsoft touchstart"),e.unmousewheel&&e.unmousewheel())},L(I.ownerDocument).off("keydown.xdsoftctrl keyup.xdsoftctrl").off("keydown.xdsoftcmd keyup.xdsoftcmd").on("keydown.xdsoftctrl",function(e){e.keyCode===p&&(N=!0)}).on("keyup.xdsoftctrl",function(e){e.keyCode===p&&(N=!1)}).on("keydown.xdsoftcmd",function(e){91===e.keyCode&&!0}).on("keyup.xdsoftcmd",function(e){91===e.keyCode&&!1}),this.each(function(){var t,e=L(this).data("xdsoft_datetimepicker");if(e){if("string"===L.type(j))switch(j){case"show":L(this).select().focus(),e.trigger("open.xdsoft");break;case"hide":e.trigger("close.xdsoft");break;case"toggle":e.trigger("toggle.xdsoft");break;case"destroy":r(L(this));break;case"reset":this.value=this.defaultValue,this.value&&e.data("xdsoft_datetime").isValidDate(E.parseDate(this.value,I.format))||e.data("changed",!1),e.data("xdsoft_datetime").setCurrentTime(this.value);break;case"validate":e.data("input").trigger("blur.xdsoft");break;default:e[j]&&L.isFunction(e[j])&&(n=e[j](a))}else e.setOptions(j);return 0}"string"!==L.type(j)&&(!I.lazyInit||I.open||I.inline?o(L(this)):(t=L(this)).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function e(){t.is(":disabled")||t.data("xdsoft_datetimepicker")||(clearTimeout(i),i=setTimeout(function(){t.data("xdsoft_datetimepicker")||o(t),t.off("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",e).trigger("open.xdsoft")},100))}))}),n},L.fn.datetimepicker.defaults=s};!function(e){"function"==typeof define&&define.amd?define(["jquery","jquery-mousewheel"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(datetimepickerFactory); \ No newline at end of file +var datetimepickerFactory=function(I){"use strict";function t(){var e={days:(e=s.i18n[E]).dayOfWeek,daysShort:e.dayOfWeekShort,months:e.months,monthsShort:I.map(e.months,function(e){return e.substring(0,3)})};"function"==typeof DateFormatter&&(L=a=new DateFormatter({dateSettings:I.extend({},o,e)}))}var s={i18n:{ar:{months:["كانون الثاني","شباط","آذار","نيسان","مايو","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],dayOfWeekShort:["ن","ث","ع","خ","ج","س","ح"],dayOfWeek:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت","الأحد"]},ro:{months:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"],dayOfWeekShort:["Du","Lu","Ma","Mi","Jo","Vi","Sâ"],dayOfWeek:["Duminică","Luni","Marţi","Miercuri","Joi","Vineri","Sâmbătă"]},id:{months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],dayOfWeekShort:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],dayOfWeek:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},is:{months:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],dayOfWeekShort:["Sun","Mán","Þrið","Mið","Fim","Fös","Lau"],dayOfWeek:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur"]},bg:{months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],dayOfWeekShort:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],dayOfWeek:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота"]},fa:{months:["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],dayOfWeekShort:["یکشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],dayOfWeek:["یک‌شنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنج‌شنبه","جمعه","شنبه","یک‌شنبه"]},ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],dayOfWeekShort:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],dayOfWeek:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"]},uk:{months:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"],dayOfWeekShort:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],dayOfWeek:["Неділя","Понеділок","Вівторок","Середа","Четвер","П'ятниця","Субота"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeekShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},el:{months:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],dayOfWeekShort:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],dayOfWeek:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeekShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayOfWeek:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeekShort:["zo","ma","di","wo","do","vr","za"],dayOfWeek:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},tr:{months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],dayOfWeekShort:["Paz","Pts","Sal","Çar","Per","Cum","Cts"],dayOfWeek:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],dayOfWeekShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],dayOfWeek:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeekShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],dayOfWeek:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"]},th:{months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],dayOfWeekShort:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],dayOfWeek:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์","อาทิตย์"]},pl:{months:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],dayOfWeekShort:["nd","pn","wt","śr","cz","pt","sb"],dayOfWeek:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeekShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"],dayOfWeek:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"]},ch:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeekShort:["日","一","二","三","四","五","六"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeekShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"]},km:{months:["មករា​","កុម្ភៈ","មិនា​","មេសា​","ឧសភា​","មិថុនា​","កក្កដា​","សីហា​","កញ្ញា​","តុលា​","វិច្ឆិកា","ធ្នូ​"],dayOfWeekShort:["អាទិ​","ច័ន្ទ​","អង្គារ​","ពុធ​","ព្រហ​​","សុក្រ​","សៅរ៍"],dayOfWeek:["អាទិត្យ​","ច័ន្ទ​","អង្គារ​","ពុធ​","ព្រហស្បតិ៍​","សុក្រ​","សៅរ៍"]},kr:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeekShort:["일","월","화","수","목","금","토"],dayOfWeek:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeekShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],dayOfWeek:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"]},da:{months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],dayOfWeekShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],dayOfWeek:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},no:{months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],dayOfWeekShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],dayOfWeek:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"]},ja:{months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeekShort:["日","月","火","水","木","金","土"],dayOfWeek:["日曜","月曜","火曜","水曜","木曜","金曜","土曜"]},vi:{months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayOfWeekShort:["CN","T2","T3","T4","T5","T6","T7"],dayOfWeek:["Chủ nhật","Thứ hai","Thứ ba","Thứ tư","Thứ năm","Thứ sáu","Thứ bảy"]},sl:{months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],dayOfWeekShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob"],dayOfWeek:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota"]},cs:{months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],dayOfWeekShort:["Ne","Po","Út","St","Čt","Pá","So"]},hu:{months:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],dayOfWeekShort:["Va","Hé","Ke","Sze","Cs","Pé","Szo"],dayOfWeek:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"]},az:{months:["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"],dayOfWeekShort:["B","Be","Ça","Ç","Ca","C","Ş"],dayOfWeek:["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"]},bs:{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeekShort:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],dayOfWeek:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"]},ca:{months:["Gener","Febrer","Març","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"],dayOfWeekShort:["Dg","Dl","Dt","Dc","Dj","Dv","Ds"],dayOfWeek:["Diumenge","Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabte"]},"en-GB":{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeekShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},et:{months:["Jaanuar","Veebruar","Märts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"],dayOfWeekShort:["P","E","T","K","N","R","L"],dayOfWeek:["Pühapäev","Esmaspäev","Teisipäev","Kolmapäev","Neljapäev","Reede","Laupäev"]},eu:{months:["Urtarrila","Otsaila","Martxoa","Apirila","Maiatza","Ekaina","Uztaila","Abuztua","Iraila","Urria","Azaroa","Abendua"],dayOfWeekShort:["Ig.","Al.","Ar.","Az.","Og.","Or.","La."],dayOfWeek:["Igandea","Astelehena","Asteartea","Asteazkena","Osteguna","Ostirala","Larunbata"]},fi:{months:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],dayOfWeekShort:["Su","Ma","Ti","Ke","To","Pe","La"],dayOfWeek:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"]},gl:{months:["Xan","Feb","Maz","Abr","Mai","Xun","Xul","Ago","Set","Out","Nov","Dec"],dayOfWeekShort:["Dom","Lun","Mar","Mer","Xov","Ven","Sab"],dayOfWeek:["Domingo","Luns","Martes","Mércores","Xoves","Venres","Sábado"]},hr:{months:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],dayOfWeekShort:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],dayOfWeek:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"]},ko:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeekShort:["일","월","화","수","목","금","토"],dayOfWeek:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},lt:{months:["Sausio","Vasario","Kovo","Balandžio","Gegužės","Birželio","Liepos","Rugpjūčio","Rugsėjo","Spalio","Lapkričio","Gruodžio"],dayOfWeekShort:["Sek","Pir","Ant","Tre","Ket","Pen","Šeš"],dayOfWeek:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis"]},lv:{months:["Janvāris","Februāris","Marts","Aprīlis ","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],dayOfWeekShort:["Sv","Pr","Ot","Tr","Ct","Pk","St"],dayOfWeek:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena"]},mk:{months:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],dayOfWeekShort:["нед","пон","вто","сре","чет","пет","саб"],dayOfWeek:["Недела","Понеделник","Вторник","Среда","Четврток","Петок","Сабота"]},mn:{months:["1-р сар","2-р сар","3-р сар","4-р сар","5-р сар","6-р сар","7-р сар","8-р сар","9-р сар","10-р сар","11-р сар","12-р сар"],dayOfWeekShort:["Дав","Мяг","Лха","Пүр","Бсн","Бям","Ням"],dayOfWeek:["Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба","Ням"]},"pt-BR":{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeekShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dayOfWeek:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"]},sk:{months:["Január","Február","Marec","Apríl","Máj","Jún","Júl","August","September","Október","November","December"],dayOfWeekShort:["Ne","Po","Ut","St","Št","Pi","So"],dayOfWeek:["Nedeľa","Pondelok","Utorok","Streda","Štvrtok","Piatok","Sobota"]},sq:{months:["Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","Nëntor","Dhjetor"],dayOfWeekShort:["Die","Hën","Mar","Mër","Enj","Pre","Shtu"],dayOfWeek:["E Diel","E Hënë","E Martē","E Mërkurë","E Enjte","E Premte","E Shtunë"]},"sr-YU":{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeekShort:["Ned","Pon","Uto","Sre","čet","Pet","Sub"],dayOfWeek:["Nedelja","Ponedeljak","Utorak","Sreda","Četvrtak","Petak","Subota"]},sr:{months:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"],dayOfWeekShort:["нед","пон","уто","сре","чет","пет","суб"],dayOfWeek:["Недеља","Понедељак","Уторак","Среда","Четвртак","Петак","Субота"]},sv:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeekShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],dayOfWeek:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"]},"zh-TW":{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeekShort:["日","一","二","三","四","五","六"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},zh:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeekShort:["日","一","二","三","四","五","六"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},ug:{months:["1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي"],dayOfWeek:["يەكشەنبە","دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"]},he:{months:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],dayOfWeekShort:["א'","ב'","ג'","ד'","ה'","ו'","שבת"],dayOfWeek:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת","ראשון"]},hy:{months:["Հունվար","Փետրվար","Մարտ","Ապրիլ","Մայիս","Հունիս","Հուլիս","Օգոստոս","Սեպտեմբեր","Հոկտեմբեր","Նոյեմբեր","Դեկտեմբեր"],dayOfWeekShort:["Կի","Երկ","Երք","Չոր","Հնգ","Ուրբ","Շբթ"],dayOfWeek:["Կիրակի","Երկուշաբթի","Երեքշաբթի","Չորեքշաբթի","Հինգշաբթի","Ուրբաթ","Շաբաթ"]},kg:{months:["Үчтүн айы","Бирдин айы","Жалган Куран","Чын Куран","Бугу","Кулжа","Теке","Баш Оона","Аяк Оона","Тогуздун айы","Жетинин айы","Бештин айы"],dayOfWeekShort:["Жек","Дүй","Шей","Шар","Бей","Жум","Ише"],dayOfWeek:["Жекшемб","Дүйшөмб","Шейшемб","Шаршемб","Бейшемби","Жума","Ишенб"]},rm:{months:["Schaner","Favrer","Mars","Avrigl","Matg","Zercladur","Fanadur","Avust","Settember","October","November","December"],dayOfWeekShort:["Du","Gli","Ma","Me","Gie","Ve","So"],dayOfWeek:["Dumengia","Glindesdi","Mardi","Mesemna","Gievgia","Venderdi","Sonda"]},ka:{months:["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი"],dayOfWeekShort:["კვ","ორშ","სამშ","ოთხ","ხუთ","პარ","შაბ"],dayOfWeek:["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"]},kk:{months:["Қаңтар","Ақпан","Наурыз","Сәуір","Мамыр","Маусым","Шілде","Тамыз","Қыркүйек","Қазан","Қараша","Желтоқсан"],dayOfWeekShort:["Жк","Дс","Сс","Ср","Бс","Жм","Сб"],dayOfWeek:["Жексенбі","Дүйсенбі","Сейсенбі","Сәрсенбі","Бейсенбі","Жұма","Сенбі"]}},ownerDocument:document,contentWindow:window,value:"",rtl:!1,format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,monthChangeSpinner:!0,closeOnDateSelect:!1,closeOnTimeSelect:!0,closeOnWithoutClick:!0,closeOnInputClick:!0,openOnFocus:!0,timepicker:!0,datepicker:!0,weeks:!1,defaultTime:!1,defaultDate:!1,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,minDateTime:!1,maxDateTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,theme:"",touchMovedThreshold:5,onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onGetWeekOfYear:function(){},onChangeYear:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,parentID:"body",timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,prevButton:!0,nextButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,monthStart:0,monthEnd:11,style:"",id:"",fixed:!1,roundTime:"round",className:"",weekends:[],highlightedDates:[],highlightedPeriods:[],allowDates:[],allowDateRe:null,disabledDates:[],disabledWeekDays:[],yearOffset:0,beforeShowDay:null,enterLikeTab:!0,showApplyButton:!1,insideParent:!1},L=null,a=null,E="en",o={meridiem:["AM","PM"]},r={moment:{default_options:{format:"YYYY/MM/DD HH:mm",formatDate:"YYYY/MM/DD",formatTime:"HH:mm"},formatter:{parseDate:function(e,t){if(i(t))return a.parseDate(e,t);t=moment(e,t);return!!t.isValid()&&t.toDate()},formatDate:function(e,t){return i(t)?a.formatDate(e,t):moment(e).format(t)},formatMask:function(e){return e.replace(/Y{4}/g,"9999").replace(/Y{2}/g,"99").replace(/M{2}/g,"19").replace(/D{2}/g,"39").replace(/H{2}/g,"29").replace(/m{2}/g,"59").replace(/s{2}/g,"59")}}}};I.datetimepicker={setLocale:function(e){e=s.i18n[e]?e:"en";E!==e&&(E=e,t())},setDateFormatter:function(e){var t;L="string"==typeof e&&r.hasOwnProperty(e)?(t=r[e],I.extend(s,t.default_options),t.formatter):e}};var n={RFC_2822:"D, d M Y H:i:s O",ATOM:"Y-m-dTH:i:sP",ISO_8601:"Y-m-dTH:i:sO",RFC_822:"D, d M y H:i:s O",RFC_850:"l, d-M-y H:i:s T",RFC_1036:"D, d M y H:i:s O",RFC_1123:"D, d M Y H:i:s O",RSS:"D, d M Y H:i:s O",W3C:"Y-m-dTH:i:sP"},i=function(e){return-1!==Object.values(n).indexOf(e)};function V(e,t,a){this.date=e,this.desc=t,this.style=a}I.extend(I.datetimepicker,n),t(),window.getComputedStyle||(window.getComputedStyle=function(a){return this.el=a,this.getPropertyValue=function(e){var t=/(-([a-z]))/g;return"float"===e&&(e="styleFloat"),t.test(e)&&(e=e.replace(t,function(e,t,a){return a.toUpperCase()})),a.currentStyle[e]||null},this}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){for(var a=t||0,o=this.length;a'),u=I('
'),d.append(u),l.addClass("xdsoft_scroller_box").append(d),a=function(e){e=t(e).y-r+p;e<0&&(e=0),e+u[0].offsetHeight>h&&(e=h-u[0].offsetHeight),l.trigger("scroll_element.xdsoft_scroller",[c?e/c:0])},u.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",function(e){i||l.trigger("resize_scroll.xdsoft_scroller",[D]),r=t(e).y,p=parseInt(u.css("marginTop"),10),h=d[0].offsetHeight,"mousedown"===e.type||"touchstart"===e.type?(y.ownerDocument&&I(y.ownerDocument.body).addClass("xdsoft_noselect"),I([y.ownerDocument.body,y.contentWindow]).on("touchend mouseup.xdsoft_scroller",function e(){I([y.ownerDocument.body,y.contentWindow]).off("touchend mouseup.xdsoft_scroller",e).off("mousemove.xdsoft_scroller",a).removeClass("xdsoft_noselect")}),I(y.ownerDocument.body).on("mousemove.xdsoft_scroller",a)):(g=!0,e.stopPropagation(),e.preventDefault())}).on("touchmove",function(e){g&&(e.preventDefault(),a(e))}).on("touchend touchcancel",function(){g=!1,p=0}),l.on("scroll_element.xdsoft_scroller",function(e,t){i||l.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=1'),e=I(''),m=I('
'),_=I('
'),F=I('
'),n=I('
'),l=n.find(".xdsoft_time_box").eq(0),C=I('
'),i=I(''),A=I('
'),P=I('
'),s=!1,d=0;N.id&&W.attr("id",N.id),N.style&&W.attr("style",N.style),N.weeks&&W.addClass("xdsoft_showweeks"),N.rtl&&W.addClass("xdsoft_rtl"),W.addClass("xdsoft_"+N.theme),W.addClass(N.className),_.find(".xdsoft_month span").after(A),_.find(".xdsoft_year span").after(P),_.find(".xdsoft_month,.xdsoft_year").on("touchstart mousedown.xdsoft",function(e){var t,a,o=I(this).find(".xdsoft_select").eq(0),r=0,n=0,i=o.is(":visible");for(_.find(".xdsoft_select").hide(),w.currentTime&&(r=w.currentTime[I(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),o[i?"hide":"show"](),t=o.find("div.xdsoft_option"),a=0;aN.touchMovedThreshold&&(this.touchMoved=!0)}function f(){var e,t=!1;return N.startDate?t=w.strToDate(N.startDate):(t=N.value||(M&&M.val&&M.val()?M.val():""))?(t=w.strToDateTime(t),N.yearOffset&&(t=new Date(t.getFullYear()-N.yearOffset,t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))):N.defaultDate&&(t=w.strToDateTime(N.defaultDate),N.defaultTime&&(e=w.strtotime(N.defaultTime),t.setHours(e.getHours()),t.setMinutes(e.getMinutes()))),t&&w.isValidDate(t)?W.data("changed",!0):t="",t||0}function h(c){function m(e,t){return e=e.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}"),new RegExp(e).test(t)}function h(e,t){if(e="string"==typeof e||e instanceof String?c.ownerDocument.getElementById(e):e){if(e.createTextRange){var a=e.createTextRange();return a.collapse(!0),a.moveEnd("character",t),a.moveStart("character",t),a.select(),1}return!!e.setSelectionRange&&(e.setSelectionRange(t,t),!0)}}c.mask&&M.off("keydown.xdsoft"),!0===c.mask&&(L.formatMask?c.mask=L.formatMask(c.format):c.mask=c.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59")),"string"==typeof c.mask&&(m(c.mask,M.val())||(M.val(c.mask.replace(/[0-9]/g,"_")),h(M[0],0)),M.on("paste.xdsoft",function(e){var t=(e.clipboardData||e.originalEvent.clipboardData||window.clipboardData).getData("text"),a=this.value,o=this.selectionStart,a=a.substr(0,o)+t+a.substr(o+t.length);return o+=t.length,m(c.mask,a)?(this.value=a,h(this,o)):""===I.trim(a)?this.value=c.mask.replace(/[0-9]/g,"_"):M.trigger("error_input.xdsoft"),e.preventDefault(),!1}),M.on("keydown.xdsoft",function(e){var t,a,o,r=this.value,n=e.which,i=this.selectionStart,s=this.selectionEnd,d=i!==s;if(48<=n&&n<=57||96<=n&&n<=105||8===n||46===n){for(t=8===n||46===n?"_":String.fromCharCode(96<=n&&n<=105?n-48:n),8===n&&i&&!d&&--i;;){var u=c.mask.substr(i,1),l=i",N.weeks&&(u+=""),e=0;e<7;e+=1)u+=""+N.i18n[E].dayOfWeekShort[(e+N.dayOfWeekStart)%7]+"";for(u+="",u+="",!1!==N.maxDate&&(m=w.strToDate(N.maxDate),m=new Date(m.getFullYear(),m.getMonth(),m.getDate(),23,59,59,999)),!1!==N.minDate&&(h=w.strToDate(N.minDate),h=new Date(h.getFullYear(),h.getMonth(),h.getDate())),!1!==N.minDateTime&&(g=w.strToDate(N.minDateTime),g=new Date(g.getFullYear(),g.getMonth(),g.getDate(),g.getHours(),g.getMinutes(),g.getSeconds())),!1!==N.maxDateTime&&(p=w.strToDate(N.maxDateTime),p=new Date(p.getFullYear(),p.getMonth(),p.getDate(),p.getHours(),p.getMinutes(),p.getSeconds())),!1!==p&&(d=31*(12*p.getFullYear()+p.getMonth())+p.getDate());f"+r+"")),u+='
'+a+"
",l.getDay()===N.dayOfWeekStartPrev&&(u+="",D=!0),l.setDate(a+1)}u+="",F.html(u),_.find(".xdsoft_label span").eq(0).text(N.i18n[E].months[w.currentTime.getMonth()]),_.find(".xdsoft_label span").eq(1).text(w.currentTime.getFullYear()+N.yearOffset),T=k="";var b=0;!1!==N.minTime&&(b=60*(v=w.strtotime(N.minTime)).getHours()+v.getMinutes());var v,T,S=1440;if(!1!==N.maxTime&&(S=60*(v=w.strtotime(N.maxTime)).getHours()+v.getMinutes()),!1!==N.minDateTime&&(v=w.strToDateTime(N.minDateTime),L.formatDate(w.currentTime,N.formatDate)===L.formatDate(v,N.formatDate)&&(T=60*v.getHours()+v.getMinutes(),b'+L.formatDate(a,N.formatTime)+""},N.allowTimes&&Array.isArray(N.allowTimes)&&N.allowTimes.length)for(f=0;f'+(f+N.yearOffset)+"";for(P.children().eq(0).html(Y),f=parseInt(N.monthStart,10),Y="";f<=parseInt(N.monthEnd,10);f+=1)Y+='
'+N.i18n[E].months[f]+"
";A.children().eq(0).html(Y),I(W).trigger("generate.xdsoft")},10),e.stopPropagation()}).on("afterOpen.xdsoft",function(){var e,t,a;N.timepicker&&(C.find(".xdsoft_current").length?a=".xdsoft_current":C.find(".xdsoft_init_time").length&&(a=".xdsoft_init_time"),a?(e=l[0].clientHeight,(t=C[0].offsetHeight)-e<(a=C.find(a).index()*N.timeHeightInTimePicker+1)&&(a=t-e),l.trigger("scroll_element.xdsoft_scroller",[parseInt(a,10)/(t-e)])):l.trigger("scroll_element.xdsoft_scroller",[0]))}),o=0,F.on("touchend click.xdsoft","td",function(e){e.stopPropagation(),o+=1;var t=I(this),a=w.currentTime;if(null==a&&(w.currentTime=w.now(),a=w.currentTime),t.hasClass("xdsoft_disabled"))return!1;a.setDate(1),a.setFullYear(t.data("year")),a.setMonth(t.data("month")),a.setDate(t.data("date")),W.trigger("select.xdsoft",[a]),M.val(w.str()),N.onSelectDate&&"function"==typeof N.onSelectDate&&N.onSelectDate.call(W,w.currentTime,W.data("input"),e),W.data("changed",!0),W.trigger("xchange.xdsoft"),W.trigger("changedatetime.xdsoft"),(1l+f?(n="bottom",i=l+f-o.top):i-=f):i+W[0].offsetHeight>l+f&&(i=o.top-W[0].offsetHeight+1),i<0&&(i=0),s+r.offsetWidth>u&&(s=u-r.offsetWidth)),o=W[0],c(o,function(e){if("relative"===N.contentWindow.getComputedStyle(e).getPropertyValue("position")&&u>=e.offsetWidth)return s-=(u-e.offsetWidth)/2,!1}),d={position:d,left:N.insideParent?r.offsetLeft:s,top:"",bottom:""},N.insideParent?d[n]=r.offsetTop+r.offsetHeight:d[n]=i,W.css(d)},W.on("open.xdsoft",function(e){var t=!0;N.onShow&&"function"==typeof N.onShow&&(t=N.onShow.call(W,w.currentTime,W.data("input"),e)),!1!==t&&(W.show(),r(),I(N.contentWindow).off("resize.xdsoft",r).on("resize.xdsoft",r),N.closeOnWithoutClick&&I([N.ownerDocument.body,N.contentWindow]).on("touchstart mousedown.xdsoft",function e(){W.trigger("close.xdsoft"),I([N.ownerDocument.body,N.contentWindow]).off("touchstart mousedown.xdsoft",e)}))}).on("close.xdsoft",function(e){var t=!0;_.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide(),N.onClose&&"function"==typeof N.onClose&&(t=N.onClose.call(W,w.currentTime,W.data("input"),e)),!1===t||N.opened||N.inline||W.hide(),e.stopPropagation()}).on("toggle.xdsoft",function(){W.is(":visible")?W.trigger("close.xdsoft"):W.trigger("open.xdsoft")}).data("input",M),d=0,W.data("xdsoft_datetime",w),W.setOptions(N),w.setCurrentTime(f()),M.data("xdsoft_datetimepicker",W).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function(){M.is(":disabled")||M.data("xdsoft_datetimepicker").is(":visible")&&N.closeOnInputClick||N.openOnFocus&&(clearTimeout(d),d=setTimeout(function(){M.is(":disabled")||(s=!0,w.setCurrentTime(f(),!0),N.mask&&h(N),W.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(e){var t=e.which;return-1!==[p].indexOf(t)&&N.enterLikeTab?(e=I("input:visible,textarea:visible,button:visible,a:visible"),W.trigger("close.xdsoft"),e.eq(e.index(this)+1).focus(),!1):-1!==[v].indexOf(t)?(W.trigger("close.xdsoft"),!0):void 0}).on("blur.xdsoft",function(){W.trigger("close.xdsoft")})},i=function(e){var t=e.data("xdsoft_datetimepicker");t&&(t.data("xdsoft_datetime",null),t.remove(),e.data("xdsoft_datetimepicker",null).off(".xdsoft"),I(N.contentWindow).off("resize.xdsoft"),I([N.contentWindow,N.ownerDocument.body]).off("mousedown.xdsoft touchstart"),e.unmousewheel&&e.unmousewheel())};return I(N.ownerDocument).off("keydown.xdsoftctrl keyup.xdsoftctrl").off("keydown.xdsoftcmd keyup.xdsoftcmd").on("keydown.xdsoftctrl",function(e){e.keyCode===g&&(z=!0)}).on("keyup.xdsoftctrl",function(e){e.keyCode===g&&(z=!1)}).on("keydown.xdsoftcmd",function(e){91===e.keyCode&&0}).on("keyup.xdsoftcmd",function(e){91===e.keyCode&&0}),this.each(function(){var t,e=I(this).data("xdsoft_datetimepicker");if(e){if("string"==typeof Y)switch(Y){case"show":I(this).select().focus(),e.trigger("open.xdsoft");break;case"hide":e.trigger("close.xdsoft");break;case"toggle":e.trigger("toggle.xdsoft");break;case"destroy":i(I(this));break;case"reset":this.value=this.defaultValue,this.value&&e.data("xdsoft_datetime").isValidDate(L.parseDate(this.value,N.format))||e.data("changed",!1),e.data("xdsoft_datetime").setCurrentTime(this.value);break;case"validate":e.data("input").trigger("blur.xdsoft");break;default:e[Y]&&"function"==typeof e[Y]&&(o=e[Y](a))}else e.setOptions(Y);return 0}"string"!=typeof Y&&(!N.lazyInit||N.open||N.inline?n(I(this)):(t=I(this)).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function e(){t.is(":disabled")||t.data("xdsoft_datetimepicker")||(clearTimeout(r),r=setTimeout(function(){t.data("xdsoft_datetimepicker")||n(t),t.off("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",e).trigger("open.xdsoft")},100))}))}),o},I.fn.datetimepicker.defaults=s};!function(e){"function"==typeof define&&define.amd?define(["jquery","jquery-mousewheel"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(datetimepickerFactory); \ No newline at end of file