/** * @preserve jQuery DateTimePicker plugin v2.1.9 * @homepage http://xdsoft.net/jqplugins/datetimepicker/ * (c) 2014, Chupurnov Valeriy. *//* jQuery DateTimePicker plugin v2.1.9 @homepage http://xdsoft.net/jqplugins/datetimepicker/ (c) 2014, Chupurnov Valeriy. */ (function(b){var e={i18n:{ru:{months:"\u042f\u043d\u0432\u0430\u0440\u044c \u0424\u0435\u0432\u0440\u0430\u043b\u044c \u041c\u0430\u0440\u0442 \u0410\u043f\u0440\u0435\u043b\u044c \u041c\u0430\u0439 \u0418\u044e\u043d\u044c \u0418\u044e\u043b\u044c \u0410\u0432\u0433\u0443\u0441\u0442 \u0421\u0435\u043d\u0442\u044f\u0431\u0440\u044c \u041e\u043a\u0442\u044f\u0431\u0440\u044c \u041d\u043e\u044f\u0431\u0440\u044c \u0414\u0435\u043a\u0430\u0431\u0440\u044c".split(" "),dayOfWeek:"\u0412\u0441\u043a \u041f\u043d \u0412\u0442 \u0421\u0440 \u0427\u0442 \u041f\u0442 \u0421\u0431".split(" ")},en:{months:"January February March April May June July August September October November December".split(" "),dayOfWeek:"Sun Mon Tue Wed Thu Fri Sat".split(" ")},de:{months:"Januar Februar M\u00e4rz April Mai Juni Juli August September Oktober November Dezember".split(" "),dayOfWeek:"So Mo Di Mi Do Fr Sa".split(" ")},nl:{months:"januari februari maart april mei juni juli augustus september oktober november december".split(" "),dayOfWeek:"zo ma di wo do vr za".split(" ")},tr:{months:"Ocak \u015eubat Mart Nisan May\u0131s Haziran Temmuz A\u011fustos Eyl\u00fcl Ekim Kas\u0131m Aral\u0131k".split(" "),dayOfWeek:"Paz Pts Sal \u00c7ar Per Cum Cts".split(" ")},fr:{months:"Janvier F\u00e9vrier Mars Avril Mai Juin Juillet Ao\u00fbt Septembre Octobre Novembre D\u00e9cembre".split(" "),dayOfWeek:"Dim Lun Mar Mer Jeu Ven Sam".split(" ")},es:{months:"Enero Febrero Marzo Abril Mayo Junio Julio Agosto Septiembre Octubre Noviembre Diciembre".split(" "),dayOfWeek:"Dom Lun Mar Mi\u00e9 Jue Vie S\u00e1b".split(" ")},th:{months:"\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e21\u0e35\u0e19\u0e32\u0e04\u0e21 \u0e40\u0e21\u0e29\u0e32\u0e22\u0e19 \u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21 \u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19 \u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21 \u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21 \u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19 \u0e15\u0e38\u0e25\u0e32\u0e04\u0e21 \u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19 \u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21".split(" "),dayOfWeek:"\u0e2d\u0e32. \u0e08. \u0e2d. \u0e1e. \u0e1e\u0e24. \u0e28. \u0e2a.".split(" ")},pl:{months:"stycze\u0144 luty marzec kwiecie\u0144 maj czerwiec lipiec sierpie\u0144 wrzesie\u0144 pa\u017adziernik listopad grudzie\u0144".split(" "),dayOfWeek:"nd pn wt \u015br cz pt sb".split(" ")},pt:{months:"Janeiro Fevereiro Mar\u00e7o Abril Maio Junho Julho Agosto Setembro Outubro Novembro Dezembro".split(" "),dayOfWeek:"Dom Seg Ter Qua Qui Sex Sab".split(" ")},ch:{months:"\u4e00\u6708 \u4e8c\u6708 \u4e09\u6708 \u56db\u6708 \u4e94\u6708 \u516d\u6708 \u4e03\u6708 \u516b\u6708 \u4e5d\u6708 \u5341\u6708 \u5341\u4e00\u6708 \u5341\u4e8c\u6708".split(" "),dayOfWeek:"\u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d".split("")},se:{months:"Januari Februari Mars April Maj Juni Juli Augusti September Oktober November December".split(" "),dayOfWeek:"S\u00f6n M\u00e5n Tis Ons Tor Fre L\u00f6r".split(" ")},kr:{months:"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "),dayOfWeek:"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split("")},it:{months:"Gennaio Febbraio Marzo Aprile Maggio Giugno Luglio Agosto Settembre Ottobre Novembre Dicembre".split(" "),dayOfWeek:"Dom Lun Mar Mer Gio Ven Sab".split(" ")}},value:"",lang:"en",format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",step:60,closeOnDateSelect:0,closeOnWithoutClick:!0,timepicker:!0,datepicker:!0,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,allowTimes:[],opened:!1,inline:!1,onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,mask:!1,validateOnBlur:!0,allowBlank:!1,yearStart:1950,yearEnd:2050,style:"",id:"",roundTime:"round",className:"",weekends:[],yearOffset:0};Array.prototype.indexOf||(Array.prototype.indexOf=function(b,e){for(var a=e||0,r=this.length;aa&&(a=0);a+m[0].offsetHeight>p&&(a=p-m[0].offsetHeight);k.trigger("scroll_element.xdsoft_scroller",[B?a/B:0])})});k.on("scroll_element.xdsoft_scroller",function(a,b){c||k.trigger("resize_scroll.xdsoft_scroller",[b,!0]);b=1b||isNaN(b)?0:b;m.css("margin-top",B*b);d.css("marginTop",-parseInt((n-c)*b))}).on("resize_scroll.xdsoft_scroller",function(a,b,e){c=k[0].clientHeight;n=d[0].offsetHeight;a=c/n;var g=a*w[0].offsetHeight;1parseInt(a.dayOfWeekStart)||6=h||96<=h&&105>=h||8==h||46==h:var f;a:{try{if(document.selection&&document.selection.createRange){f=document.selection.createRange().getBookmark().charCodeAt(2)-2;break a}else if(this.setSelectionRange){f=this.selectionStart;break a}}catch(m){f=0;break a}f=void 0}var g=8!=h&&46!=h?String.fromCharCode(96<=h&&105>=h?h-48:h):"_";8!=h&&46!=h||!f||(f--,g="_");for(;/[^0-9_]/.test(a.mask.substr(f,1))&&f=g?q.css("marginTop","-"+(g+a.timeHeightInTimePicker)+"px"):c.hasClass(a.prev)&&0<=g-a.timeHeightInTimePicker&&q.css("marginTop","-"+(g-a.timeHeightInTimePicker)+"px");v.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(q.css("marginTop"))/(m-d))]);e=10n;n++)h+="\x3cth\x3e"+a.i18n[a.lang].dayOfWeek[6n||!1!==p&&dh.getTime())&&u.push("xdsoft_disabled");(a.defaultSelect||c.data("changed"))&&parseInt(f.currentTime.getHours())==parseInt(b)&&(59n;n+=a.step)h=(10>g?"0":"")+g,t=(10>n?"0":"")+n,d(h,t);q.html(x);t="";g=0;for(g=parseInt(a.yearStart,10)+a.yearOffset;g<=parseInt(a.yearEnd,10)+a.yearOffset;g++)t+='\x3cdiv class\x3d"xdsoft_option '+(f.currentTime.getFullYear()==g?"xdsoft_current":"")+'" data-value\x3d"'+g+'"\x3e'+g+"\x3c/div\x3e";D.children().eq(0).html(t);g=0;for(t="";11>=g;g++)t+='\x3cdiv class\x3d"xdsoft_option '+(f.currentTime.getMonth()==g?"xdsoft_current":"")+'" data-value\x3d"'+g+'"\x3e'+a.i18n[a.lang].months[g]+"\x3c/div\x3e";C.children().eq(0).html(t);b(this).trigger("generate.xdsoft");e.stopPropagation()}).on("afterOpen.xdsoft",function(){if(a.timepicker&&q.find(".xdsoft_current").length){var b=v[0].clientHeight,c=q[0].offsetHeight,d=q.find(".xdsoft_current").index()*a.timeHeightInTimePicker+1;c-bc?f.nextMonth():f.prevMonth();return!1});c.mousewheel&&v.unmousewheel().mousewheel(function(b,c,d,e){if(!a.scrollTime)return!0;d=v[0].clientHeight;e=q[0].offsetHeight;var f=Math.abs(parseInt(q.css("marginTop"))),g=!0;0>c&&e-d-a.timeHeightInTimePicker>=f?(q.css("marginTop","-"+(f+a.timeHeightInTimePicker)+"px"),g=!1):0b(window).height()+b(window).scrollTop()&&(d=a.top-c[0].offsetHeight+1);e+c[0].offsetWidth>b(window).width()&&(e=a.left-c[0].offsetWidth+c.data("input")[0].offsetWidth);c.css({left:e,top:d})};c.on("open.xdsoft",function(){var d=!0;a.onShow&&a.onShow.call&&(d=a.onShow.call(c,f.currentTime,c.data("input")));if(!1!==d&&(c.show(),c.trigger("afterOpen.xdsoft"),F(),b(window).off("resize.xdsoft",F).on("resize.xdsoft",F),a.closeOnWithoutClick))b([document.body,window]).on("mousedown.xdsoft",function I(){c.trigger("close.xdsoft");b([document.body,window]).off("mousedown.xdsoft",I)})}).on("close.xdsoft",function(b){var d=!0;a.onClose&&a.onClose.call&&(d=a.onClose.call(c,f.currentTime,c.data("input")));!1===d||a.opened||a.inline||c.hide();b.stopPropagation()}).data("input",d);var G=0;c.data("xdsoft_datetime",f);c.setOptions(a);(e=a.value?a.value:d&&d.val&&d.val()?d.val():"")&&f.isValidDate(e=Date.parseDate(e,a.format))?c.data("changed",!0):e="";f.setCurrentTime(e?e:0);c.trigger("afterOpen.xdsoft");d.data("xdsoft_datetimepicker",c).on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function(a){d.is(":disabled")||d.is(":hidden")||!d.is(":visible")||(clearTimeout(G),G=setTimeout(function(){d.is(":disabled")||d.is(":hidden")||!d.is(":visible")||(f.setCurrentTime(d&&d.val&&d.val()?d.val():0),c.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(a){a=a.which;switch(!0){case !!~[13].indexOf(a):return a=b("input:visible,textarea:visible"),c.trigger("close.xdsoft"),a.eq(a.index(this)+1).focus(),!1;case !!~[9].indexOf(a):return c.trigger("close.xdsoft"),!0}})};b(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",function(a){17==a.keyCode&&(k=!0)}).on("keyup.xdsoftctrl",function(a){17==a.keyCode&&(k=!1)});return this.each(function(){var d;if(d=b(this).data("xdsoft_datetimepicker")){if("string"===b.type(g))switch(g){case "show":b(this).select().focus();d.trigger("open.xdsoft");break;case "hide":d.trigger("close.xdsoft");break;case "destroy":d=b(this);var c=d.data("xdsoft_datetimepicker");c&&(c.data("xdsoft_datetime",null),c.remove(),d.data("xdsoft_datetimepicker",null).off("open.xdsoft focusin.xdsoft focusout.xdsoft mousedown.xdsoft blur.xdsoft keydown.xdsoft"),b(window).off("resize.xdsoft"),b([window,document.body]).off("mousedown.xdsoft"),d.unmousewheel&&d.unmousewheel());break;case "reset":(this.value=this.defaultValue)&&d.data("xdsoft_datetime").isValidDate(Date.parseDate(this.value,a.format))||d.data("changed",!1),d.data("xdsoft_datetime").setCurrentTime(this.value)}else d.setOptions(g);return 0}"string"!==b.type(g)&&r(b(this))})}})(jQuery);Date.parseFunctions={count:0};Date.parseRegexes=[];Date.formatFunctions={count:0};Date.prototype.dateFormat=function(b){null==Date.formatFunctions[b]&&Date.createNewFormat(b);return this[Date.formatFunctions[b]]()};Date.createNewFormat=function(b){var e="format"+Date.formatFunctions.count++;Date.formatFunctions[b]=e;for(var e="Date.prototype."+e+" \x3d function() {return ",g=!1,k,a=0;ab?b+7:b};Date.prototype.getLastDayOfMonth=function(){var b=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return 0>b?b+7:b};Date.prototype.getDaysInMonth=function(){Date.daysInMonth[1]=this.isLeapYear()?29:28;return Date.daysInMonth[this.getMonth()]};Date.prototype.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};String.escape=function(b){return b.replace(/('|\\)/g,"\\$1")};String.leftPad=function(b,e,g){b=new String(b);for(null==g&&(g=" ");b.length