1/*! 2 * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2015 3 * @version 1.3.3 4 * 5 * Date formatter utility library that allows formatting date/time variables or Date objects using PHP DateTime format. 6 * @see http://php.net/manual/en/function.date.php 7 * 8 * For more JQuery plugins visit http://plugins.krajee.com 9 * For more Yii related demos visit http://demos.krajee.com 10 */ 11var DateFormatter;(function(){"use strict";var _compare,_lpad,_extend,defaultSettings,DAY,HOUR;DAY=1000*60*60*24;HOUR=3600;_compare=function(str1,str2){return typeof(str1)==='string'&&typeof(str2)==='string'&&str1.toLowerCase()===str2.toLowerCase()};_lpad=function(value,length,char){var chr=char||'0',val=value.toString();return val.length<length?_lpad(chr+val,length):val};_extend=function(out){var i,obj;out=out||{};for(i=1;i<arguments.length;i++){obj=arguments[i];if(!obj){continue} 12for(var key in obj){if(obj.hasOwnProperty(key)){if(typeof obj[key]==='object'){_extend(out[key],obj[key])}else{out[key]=obj[key]}}}} 13return out};defaultSettings={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(number){var n=number%10,suffixes={1:'st',2:'nd',3:'rd'};return Math.floor(number%100/10)===1||!suffixes[n]?'th':suffixes[n]}},separators:/[ \-+\/\.T:@]/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};DateFormatter=function(options){var self=this,config=_extend(defaultSettings,options);self.dateSettings=config.dateSettings;self.separators=config.separators;self.validParts=config.validParts;self.intParts=config.intParts;self.tzParts=config.tzParts;self.tzClip=config.tzClip};DateFormatter.prototype={constructor:DateFormatter,parseDate:function(vDate,vFormat){var self=this,vFormatParts,vDateParts,i,vDateFlag=!1,vTimeFlag=!1,vDatePart,iDatePart,vSettings=self.dateSettings,vMonth,vMeriIndex,vMeriOffset,len,mer,out={date:null,year:null,month:null,day:null,hour:0,min:0,sec:0};if(!vDate){return undefined} 14if(vDate instanceof Date){return vDate} 15if(typeof vDate==='number'){return new Date(vDate)} 16if(vFormat==='U'){i=parseInt(vDate);return i?new Date(i*1000):vDate} 17if(typeof vDate!=='string'){return''} 18vFormatParts=vFormat.match(self.validParts);if(!vFormatParts||vFormatParts.length===0){throw new Error("Invalid date format definition.")} 19vDateParts=vDate.replace(self.separators,'\0').split('\0');for(i=0;i<vDateParts.length;i++){vDatePart=vDateParts[i];iDatePart=parseInt(vDatePart);switch(vFormatParts[i]){case 'y':case 'Y':len=vDatePart.length;if(len===2){out.year=parseInt((iDatePart<70?'20':'19')+vDatePart)}else if(len===4){out.year=iDatePart} 20vDateFlag=!0;break;case 'm':case 'n':case 'M':case 'F':if(isNaN(vDatePart)){vMonth=vSettings.monthsShort.indexOf(vDatePart);if(vMonth>-1){out.month=vMonth+1} 21vMonth=vSettings.months.indexOf(vDatePart);if(vMonth>-1){out.month=vMonth+1}}else{if(iDatePart>=1&&iDatePart<=12){out.month=iDatePart}} 22vDateFlag=!0;break;case 'd':case 'j':if(iDatePart>=1&&iDatePart<=31){out.day=iDatePart} 23vDateFlag=!0;break;case 'g':case 'h':vMeriIndex=(vFormatParts.indexOf('a')>-1)?vFormatParts.indexOf('a'):(vFormatParts.indexOf('A')>-1)?vFormatParts.indexOf('A'):-1;mer=vDateParts[vMeriIndex];if(vMeriIndex>-1){vMeriOffset=_compare(mer,vSettings.meridiem[0])?0:(_compare(mer,vSettings.meridiem[1])?12:-1);if(iDatePart>=1&&iDatePart<=12&&vMeriOffset>-1){out.hour=iDatePart+vMeriOffset}else if(iDatePart>=0&&iDatePart<=23){out.hour=iDatePart}}else if(iDatePart>=0&&iDatePart<=23){out.hour=iDatePart} 24vTimeFlag=!0;break;case 'G':case 'H':if(iDatePart>=0&&iDatePart<=23){out.hour=iDatePart} 25vTimeFlag=!0;break;case 'i':if(iDatePart>=0&&iDatePart<=59){out.min=iDatePart} 26vTimeFlag=!0;break;case 's':if(iDatePart>=0&&iDatePart<=59){out.sec=iDatePart} 27vTimeFlag=!0;break}} 28if(vDateFlag===!0&&out.year&&out.month&&out.day){out.date=new Date(out.year,out.month-1,out.day,out.hour,out.min,out.sec,0)}else{if(vTimeFlag!==!0){return!1} 29out.date=new Date(0,0,0,out.hour,out.min,out.sec,0)} 30return out.date},guessDate:function(vDateStr,vFormat){if(typeof vDateStr!=='string'){return vDateStr} 31var self=this,vParts=vDateStr.replace(self.separators,'\0').split('\0'),vPattern=/^[djmn]/g,vFormatParts=vFormat.match(self.validParts),vDate=new Date(),vDigit=0,vYear,i,iPart,iSec;if(!vPattern.test(vFormatParts[0])){return vDateStr} 32for(i=0;i<vParts.length;i++){vDigit=2;iPart=vParts[i];iSec=parseInt(iPart.substr(0,2));switch(i){case 0:if(vFormatParts[0]==='m'||vFormatParts[0]==='n'){vDate.setMonth(iSec-1)}else{vDate.setDate(iSec)} 33break;case 1:if(vFormatParts[0]==='m'||vFormatParts[0]==='n'){vDate.setDate(iSec)}else{vDate.setMonth(iSec-1)} 34break;case 2:vYear=vDate.getFullYear();if(iPart.length<4){vDate.setFullYear(parseInt(vYear.toString().substr(0,4-iPart.length)+iPart));vDigit=iPart.length}else{vDate.setFullYear=parseInt(iPart.substr(0,4));vDigit=4} 35break;case 3:vDate.setHours(iSec);break;case 4:vDate.setMinutes(iSec);break;case 5:vDate.setSeconds(iSec);break} 36if(iPart.substr(vDigit).length>0){vParts.splice(i+1,0,iPart.substr(vDigit))}} 37return vDate},parseFormat:function(vChar,vDate){var self=this,vSettings=self.dateSettings,fmt,backspace=/\\?(.?)/gi,doFormat=function(t,s){return fmt[t]?fmt[t]():s};fmt={d:function(){return _lpad(fmt.j(),2)},D:function(){return vSettings.daysShort[fmt.w()]},j:function(){return vDate.getDate()},l:function(){return vSettings.days[fmt.w()]},N:function(){return fmt.w()||7},w:function(){return vDate.getDay()},z:function(){var a=new Date(fmt.Y(),fmt.n()-1,fmt.j()),b=new Date(fmt.Y(),0,1);return Math.round((a-b)/DAY)},W:function(){var a=new Date(fmt.Y(),fmt.n()-1,fmt.j()-fmt.N()+3),b=new Date(a.getFullYear(),0,4);return _lpad(1+Math.round((a-b)/DAY/7),2)},F:function(){return vSettings.months[vDate.getMonth()]},m:function(){return _lpad(fmt.n(),2)},M:function(){return vSettings.monthsShort[vDate.getMonth()]},n:function(){return vDate.getMonth()+1},t:function(){return(new Date(fmt.Y(),fmt.n(),0)).getDate()},L:function(){var Y=fmt.Y();return(Y%4===0&&Y%100!==0||Y%400===0)?1:0},o:function(){var n=fmt.n(),W=fmt.W(),Y=fmt.Y();return Y+(n===12&&W<9?1:n===1&&W>9?-1:0)},Y:function(){return vDate.getFullYear()},y:function(){return fmt.Y().toString().slice(-2)},a:function(){return fmt.A().toLowerCase()},A:function(){var n=fmt.G()<12?0:1;return vSettings.meridiem[n]},B:function(){var H=vDate.getUTCHours()*HOUR,i=vDate.getUTCMinutes()*60,s=vDate.getUTCSeconds();return _lpad(Math.floor((H+i+s+HOUR)/86.4)%1000,3)},g:function(){return fmt.G()%12||12},G:function(){return vDate.getHours()},h:function(){return _lpad(fmt.g(),2)},H:function(){return _lpad(fmt.G(),2)},i:function(){return _lpad(vDate.getMinutes(),2)},s:function(){return _lpad(vDate.getSeconds(),2)},u:function(){return _lpad(vDate.getMilliseconds()*1000,6)},e:function(){var str=/\((.*)\)/.exec(String(vDate))[1];return str||'Coordinated Universal Time'},T:function(){var str=(String(vDate).match(self.tzParts)||[""]).pop().replace(self.tzClip,"");return str||'UTC'},I:function(){var a=new Date(fmt.Y(),0),c=Date.UTC(fmt.Y(),0),b=new Date(fmt.Y(),6),d=Date.UTC(fmt.Y(),6);return((a-c)!==(b-d))?1:0},O:function(){var tzo=vDate.getTimezoneOffset(),a=Math.abs(tzo);return(tzo>0?'-':'+')+_lpad(Math.floor(a/60)*100+a%60,4)},P:function(){var O=fmt.O();return(O.substr(0,3)+':'+O.substr(3,2))},Z:function(){return-vDate.getTimezoneOffset()*60},c:function(){return'Y-m-d\\TH:i:sP'.replace(backspace,doFormat)},r:function(){return'D, d M Y H:i:s O'.replace(backspace,doFormat)},U:function(){return vDate.getTime()/1000||0}};return doFormat(vChar,vChar)},formatDate:function(vDate,vFormat){var self=this,i,n,len,str,vChar,vDateStr='';if(typeof vDate==='string'){vDate=self.parseDate(vDate,vFormat);if(vDate===!1){return!1}} 38if(vDate instanceof Date){len=vFormat.length;for(i=0;i<len;i++){vChar=vFormat.charAt(i);if(vChar==='S'){continue} 39str=self.parseFormat(vChar,vDate);if(i!==(len-1)&&self.intParts.test(vChar)&&vFormat.charAt(i+1)==='S'){n=parseInt(str);str+=self.dateSettings.ordinal(n)} 40vDateStr+=str} 41return vDateStr} 42return''}}})();/** 43 * @preserve jQuery DateTimePicker plugin v2.5.4 44 * @homepage http://xdsoft.net/jqplugins/datetimepicker/ 45 * @author Chupurnov Valeriy (<[email protected]>) 46 */ 47;(function(factory){if(typeof define==='function'&&define.amd){define(['jquery','jquery-mousewheel'],factory)}else if(typeof exports==='object'){module.exports=factory}else{factory(jQuery)}}(function($){'use strict';var currentlyScrollingTimeDiv=!1;var default_options={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","Frid
47ay","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"]},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:["January","Februar","Marts","April","Maj","Juni","July","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","Frid
47ay","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:["æææ¥","ææä¸","ææäº","ææä¸","ææå","ææäº","ææå
"]},he:{months:['×× ××ר','פ×ר××ר','×רץ','×פר××','×××','××× ×','××××','××××ס×','ספ×××ר','×××§×××ר','× ××××ר','×צ××ר'],dayOfWeekShort:['×\'','×\'','×\'','×\'','×\'','×\'','ש×ת'],dayOfWeek:["ר×ש××","×©× ×","ש××ש×","ר×××¢×","×××ש×","ש×ש×","ש×ת","ר×ש××"]},hy:{months:["ÕÕ¸ÖÕ¶Õ¾Õ¡Ö","ÕÕ¥Õ¿ÖÕ¾Õ¡Ö","ÕÕ¡ÖÕ¿","Ô±ÕºÖÕ«Õ¬","ÕÕ¡ÕµÕ«Õ½","ÕÕ¸ÖÕ¶Õ«Õ½","ÕÕ¸ÖÕ¬Õ«Õ½","ÕÕ£Õ¸Õ½Õ¿Õ¸Õ½","ÕÕ¥ÕºÕ¿Õ¥Õ´Õ¢Õ¥Ö","ÕÕ¸Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö","ÕÕ¸ÕµÕ¥Õ´Õ¢Õ¥Ö","Ô´Õ¥Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö"],dayOfWeekShort:["Ô¿Õ«","ÔµÖÕ¯","ÔµÖÖ","ÕÕ¸Ö","ÕÕ¶Õ£","ÕÖÖÕ¢","ÕÕ¢Õ©"],dayOfWeek:["Ô¿Õ«ÖÕ¡Õ¯Õ«","ÔµÖÕ¯Õ¸ÖÕ·Õ¡Õ¢Õ©Õ«","ÔµÖÕ¥ÖÕ·Õ¡Õ¢Õ©Õ«","ÕÕ¸ÖÕ¥ÖÕ·Õ¡Õ¢Õ©Õ«","ÕÕ«Õ¶Õ£Õ·Õ¡Õ¢Õ©Õ«","ÕÖÖÕ¢Õ¡Õ©","ÕÕ¡Õ¢Õ¡Õ©"]}
47,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:["áááá á","áá á¨ááááá","á¡ááá¨ááááá","ááá®á¨ááááá","á®á£áá¨ááááá","ááá áá¡áááá","á¨ááááá"]},},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,timepicker:!0,datepicker:!0,weeks:!1,defaultTime:!1,defaultDate:!1,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,disabledMinTime:!1,disabledMaxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,theme:'',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};var dateHelper=null,globalLocaleDefault='en',globalLocale='en';var dateFormatterOptionsDefault={meridiem:['AM','PM']};var initDateFormatter=function(){var locale=default_options.i18n[globalLocale],opts={days:locale.dayOfWeek,daysShort:locale.dayOfWeekShort,months:locale.months,monthsShort:$.map(locale.months,function(n){return n.substring(0,3)}),};dateHelper=new DateFormatter({dateSettings:$.extend({},dateFormatterOptionsDefault,opts)})};$.datetimepicker={setLocale:function(locale){var newLocale=default_options.i18n[locale]?locale:globalLocaleDefault;if(globalLocale!=newLocale){globalLocale=newLocale;initDateFormatter()}},setDateFormatter:function(dateFormatter){dateHelper=dateFormatter},RFC_2822:'D, d M Y H:i:s O',ATOM:'Y-m-d\TH:i:sP',ISO_8601:'Y-m-d\TH: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-d\TH:i:sP'};initDateFormatter();if(!window.getComputedStyle){window.getComputedStyle=function(el,pseudo){this.el=el;this.getPropertyValue=function(prop){var re=/(\-([a-z]){1})/g;if(prop==='float'){prop='styleFloat'} 48if(re.test(prop)){prop=prop.replace(re,function(a,b,c){return c.toUpperCase()})} 49return el.currentStyle[prop]||null};return this}} 50if(!Array.prototype.indexOf){Array.prototype.indexOf=function(obj,start){var i,j;for(i=(start||0),j=this.length;i<j;i+=1){if(this[i]===obj){return i}} 51return-1}} 52Date.prototype.countDaysInMonth=function(){return new Date(this.getFullYear(),this.getMonth()+1,0).getDate()};$.fn.xdsoftScroller=function(percent){return this.each(function(){var timeboxparent=$(this),pointerEventToXY=function(e){var out={x:0,y:0},touch;if(e.type==='touchstart'||e.type==='touchmove'||e.type==='touchend'||e.type==='touchcancel'){touch=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];out.x=touch.clientX;out.y=touch.clientY}else if(e.type==='mousedown'||e.type==='mouseup'||e.type==='mousemove'||e.type==='mouseover'||e.type==='mouseout'||e.type==='mouseenter'||e.type==='mouseleave'){out.x=e.clientX;out.y=e.clientY} 53return out},timebox,parentHeight,height,scrollbar,scroller,maximumOffset=100,start=!1,startY=0,startTop=0,h1=0,touchStart=!1,startTopScroll=0,calcOffset=function(){};if(percent==='hide'){timeboxparent.find('.xdsoft_scrollbar').hide();return} 54if(!$(this).hasClass('xdsoft_scroller_box')){timebox=timeboxparent.children().eq(0);parentHeight=timeboxparent[0].clientHeight;height=timebox[0].offsetHeight;scrollbar=$('<div class="xdsoft_scrollbar"></div>');scroller=$('<div class="xdsoft_scroller"></div>');scrollbar.append(scroller);timeboxparent.addClass('xdsoft_scroller_box').append(scrollbar);calcOffset=function calcOffset(event){var offset=pointerEventToXY(event).y-startY+startTopScroll;if(offset<0){offset=0} 55if(offset+scroller[0].offsetHeight>h1){offset=h1-scroller[0].offsetHeight} 56timeboxparent.trigger('scroll_element.xdsoft_scroller',[maximumOffset?offset/maximumOffset:0])};scroller.on('touchstart.xdsoft_scroller mousedown.xdsoft_scroller',function(event){if(!parentHeight){timeboxparent.trigger('resize_scroll.xdsoft_scroller',[percent])} 57startY=pointerEventToXY(event).y;startTopScroll=parseInt(scroller.css('margin-top'),10);h1=scrollbar[0].offsetHeight;if(event.type==='mousedown'||event.type==='touchstart'){if(document){$(document.body).addClass('xdsoft_noselect')} 58$([document.body,window]).on('touchend mouseup.xdsoft_scroller',function arguments_callee(){$([document.body,window]).off('touchend mouseup.xdsoft_scroller',arguments_callee).off('mousemove.xdsoft_scroller',calcOffset).removeClass('xdsoft_noselect')});$(document.body).on('mousemove.xdsoft_scroller',calcOffset)}else{touchStart=!0;event.stopPropagation();event.preventDefault()}}).on('touchmove',function(event){if(touchStart){event.preventDefault();calcOffset(event)}}).on('touchend touchcancel',function(){touchStart=!1;startTopScroll=0});timeboxparent.on('scroll_element.xdsoft_scroller',function(event,percentage){if(!parentHeight){timeboxparent.trigger('resize_scroll.xdsoft_scroller',[percentage,!0])} 59percentage=percentage>1?1:(percentage<0||isNaN(percentage))?0:percentage;scroller.css('margin-top',maximumOffset*percentage);setTimeout(function(){timebox.css('marginTop',-parseInt((timebox[0].offsetHeight-parentHeight)*percentage,10))},10)}).on('resize_scroll.xdsoft_scroller',function(event,percentage,noTriggerScroll){var percent,sh;parentHeight=timeboxparent[0].clientHeight;height=timebox[0].offsetHeight;percent=parentHeight/height;sh=percent*scrollbar[0].offsetHeight;if(percent>1){scroller.hide()}else{scroller.show();scroller.css('height',parseInt(sh>10?sh:10,10));maximumOffset=scrollbar[0].offsetHeight-scroller[0].offsetHeight;if(noTriggerScroll!==!0){timeboxparent.trigger('scroll_element.xdsoft_scroller',[percentage||Math.abs(parseInt(timebox.css('marginTop'),10))/(height-parentHeight)])}}});timeboxparent.on('mousewheel',function(event){var top=Math.abs(parseInt(timebox.css('marginTop'),10));top=top-(event.deltaY*20);if(top<0){top=0} 60timeboxparent.trigger('scroll_element.xdsoft_scroller',[top/(height-parentHeight)]);event.stopPropagation();return!1});timeboxparent.on('touchstart',function(event){start=pointerEventToXY(event);startTop=Math.abs(parseInt(timebox.css('marginTop'),10))});timeboxparent.on('touchmove',function(event){if(start){event.preventDefault();var coord=pointerEventToXY(event);timeboxparent.trigger('scroll_element.xdsoft_scroller',[(startTop-(coord.y-start.y))/(height-parentHeight)])}});timeboxparent.on('touchend touchcancel',function(){start=!1;startTop=0})} 61timeboxparent.trigger('resize_scroll.xdsoft_scroller',[percent])})};$.fn.datetimepicker=function(opt,opt2){var result=this,KEY0=48,KEY9=57,_KEY0=96,_KEY9=105,CTRLKEY=17,DEL=46,ENTER=13,ESC=27,BACKSPACE=8,ARROWLEFT=37,ARROWUP=38,ARROWRIGHT=39,ARROWDOWN=40,TAB=9,F5=116,AKEY=65,CKEY=67,VKEY=86,ZKEY=90,YKEY=89,ctrlDown=!1,options=($.isPlainObject(opt)||!opt)?$.extend(!0,{},default_options,opt):$.extend(!0,{},default_options),lazyInitTimer=0,createDateTimePicker,destroyDateTimePicker,lazyInit=function(input){input.on('open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart',function initOnActionCallback(){if(input.is(':disabled')||input.data('xdsoft_datetimepicker')){return} 62clearTimeout(lazyInitTimer);lazyInitTimer=setTimeout(function(){if(!input.data('xdsoft_datetimepicker')){createDateTimePicker(input)} 63input.off('open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart',initOnActionCallback).trigger('open.xdsoft')},100)})};createDateTimePicker=function(input){var datetimepicker=$('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'),xdsoft_copyright=$('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),datepicker=$('<div class="xdsoft_datepicker active"></div>'),month_picker=$('<div class="xdsoft_monthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button>'+'<div class="xdsoft_label xdsoft_month"><span></span><i></i></div>'+'<div class="xdsoft_label xdsoft_year"><span></span><i></i></div>'+'<button type="button" class="xdsoft_next"></button></div>'),calendar=$('<div class="xdsoft_calendar"></div>'),timepicker=$('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),timeboxparent=timepicker.find('.xdsoft_time_box').eq(0),timebox=$('<div class="xdsoft_time_variant"></div>
63'),applyButton=$('<button type="button" class="xdsoft_save_selected blue-gradient-button">Save Selected</button>'),monthselect=$('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),yearselect=$('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),triggerAfterOpen=!1,XDSoft_datetime,xchangeTimer,timerclick,current_time_index,setPos,timer=0,_xdsoft_datetime,forEachAncestorOf,throttle;if(options.id){datetimepicker.attr('id',options.id)} 64if(options.style){datetimepicker.attr('style',options.style)} 65if(options.weeks){datetimepicker.addClass('xdsoft_showweeks')} 66if(options.rtl){datetimepicker.addClass('xdsoft_rtl')} 67datetimepicker.addClass('xdsoft_'+options.theme);datetimepicker.addClass(options.className);month_picker.find('.xdsoft_month span').after(monthselect);month_picker.find('.xdsoft_year span').after(yearselect);month_picker.find('.xdsoft_month,.xdsoft_year').on('touchstart mousedown.xdsoft',function(event){var select=$(this).find('.xdsoft_select').eq(0),val=0,top=0,visible=select.is(':visible'),items,i;month_picker.find('.xdsoft_select').hide();if(_xdsoft_datetime.currentTime){val=_xdsoft_datetime.currentTime[$(this).hasClass('xdsoft_month')?'getMonth':'getFullYear']()} 68select[visible?'hide':'show']();for(items=select.find('div.xdsoft_option'),i=0;i<items.length;i+=1){if(items.eq(i).data('value')===val){break}else{top+=items[0].offsetHeight}}
69select.xdsoftScroller(top/(select.children()[0].offsetHeight-(select[0].clientHeight)));event.stopPropagation();return!1});month_picker.find('.xdsoft_select').xdsoftScroller().on('touchstart mousedown.xdsoft',function(event){event.stopPropagation();event.preventDefault()}).on('touchstart mousedown.xdsoft','.xdsoft_option',function(){if(_xdsoft_datetime.currentTime===undefined||_xdsoft_datetime.currentTime===null){_xdsoft_datetime.currentTime=_xdsoft_datetime.now()} 70var year=_xdsoft_datetime.currentTime.getFullYear();if(_xdsoft_datetime&&_xdsoft_datetime.currentTime){_xdsoft_datetime.currentTime[$(this).parent().parent().hasClass('xdsoft_monthselect')?'setMonth':'setFullYear']($(this).data('value'))} 71$(this).parent().parent().hide();datetimepicker.trigger('xchange.xdsoft');if(options.onChangeMonth&&$.isFunction(options.onChangeMonth)){options.onChangeMonth.call(datetimepicker,_xdsoft_datetime.currentTime,datetimepicker.data('input'))} 72if(year!==_xdsoft_datetime.currentTime.getFullYear()&&$.isFunction(options.onChangeYear)){options.onChangeYear.call(datetimepicker,_xdsoft_datetime.currentTime,datetimepicker.data('input'))}});datetimepicker.getValue=function(){return _xdsoft_datetime.getCurrentTime()};datetimepicker.setOptions=function(_options){var highlightedDates={};options=$.extend(!0,{},options,_options);if(_options.allowTimes&&$.isArray(_options.allowTimes)&&_options.allowTimes.length){options.allowTimes=$.extend(!0,[],_options.allowTimes)} 73if(_options.weekends&&$.isArray(_options.weekends)&&_options.weekends.length){options.weekends=$.extend(!0,[],_options.weekends)} 74if(_options.allowDates&&$.isArray(_options.allowDates)&&_options.allowDates.length){options.allowDates=$.extend(!0,[],_options.allowDates)} 75if(_options.allowDateRe&&Object.prototype.toString.call(_options.allowDateRe)==="[object String]"){options.allowDateRe=new RegExp(_options.allowDateRe)} 76if(_options.highlightedDates&&$.isArray(_options.highlightedDates)&&_options.highlightedDates.length){$.each(_options.highlightedDates,function(index,value){var splitData=$.map(value.split(','),$.trim),exDesc,hDate=new HighlightedDate(dateHelper.parseDate(splitData[0],options.formatDate),splitData[1],splitData[2]),keyDate=dateHelper.formatDate(hDate.date,options.formatDate);if(highlightedDates[keyDate]!==undefined){exDesc=highlightedDates[keyDate].desc;if(exDesc&&exDesc.length&&hDate.desc&&hDate.desc.length){highlightedDates[keyDate].desc=exDesc+"\n"+hDate.desc}}else{highlightedDates[keyDate]=hDate}});options.highlightedDates=$.extend(!0,[],highlightedDates)} 77if(_options.highlightedPeriods&&$.isArray(_options.highlightedPeriods)&&_options.highlightedPeriods.length){highlightedDates=$.extend(!0,[],options.highlightedDates);$.each(_options.highlightedPeriods,function(index,value){var dateTest,dateEnd,desc,hDate,keyDate,exDesc,style;if($.isArray(value)){dateTest=value[0];dateEnd=value[1];desc=value[2];style=value[3]}else{var splitData=$.map(value.split(','),$.trim);dateTest=dateHelper.parseDate(splitData[0],options.formatDate);dateEnd=dateHelper.parseDate(splitData[1],options.formatDate);desc=splitData[2];style=splitData[3]} 78while(dateTest<=dateEnd){hDate=new HighlightedDate(dateTest,desc,style);keyDate=dateHelper.formatDate(dateTest,options.formatDate);dateTest.setDate(dateTest.getDate()+1);if(highlightedDates[keyDate]!==undefined){exDesc=highlightedDates[keyDate].desc;if(exDesc&&exDesc.length&&hDate.desc&&hDate.desc.length){highlightedDates[keyDate].desc=exDesc+"\n"+hDate.desc}}else{highlightedDates[keyDate]=hDate}}});options.highlightedDates=$.extend(!0,[],highlightedDates)} 79if(_options.disabledDates&&$.isArray(_options.disabledDates)&&_options.disabledDates.length){options.disabledDates=$.extend(!0,[],_options.disabledDates)} 80if(_options.disabledWeekDays&&$.isArray(_options.disabledWeekDays)&&_options.disabledWeekDays.length){options.disabledWeekDays=$.extend(!0,[],_options.disabledWeekDays)} 81if((options.open||options.opened)&&(!options.inline)){input.trigger('open.xdsoft')} 82if(options.inline){triggerAfterOpen=!0;datetimepicker.addClass('xdsoft_inline');input.after(datetimepicker).hide()} 83if(options.inverseButton){options.next='xdsoft_prev';options.prev='xdsoft_next'} 84if(options.datepicker){datepicker.addClass('active')}else{datepicker.removeClass('active')} 85if(options.timepicker){timepicker.addClass('active')}else{timepicker.removeClass('active')} 86if(options.value){_xdsoft_datetime.setCurrentTime(options.value);if(input&&input.val){input.val(_xdsoft_datetime.str)}} 87if(isNaN(options.dayOfWeekStart)){options.dayOfWeekStart=0}else{options.dayOfWeekStart=parseInt(options.dayOfWeekStart,10)%7}
88if(!options.timepickerScrollbar){timeboxparent.xdsoftScroller('hide')} 89if(options.minDate&&/^[\+\-](.*)$/.test(options.minDate)){options.minDate=dateHelper.formatDate(_xdsoft_datetime.strToDateTime(options.minDate),options.formatDate)} 90if(options.maxDate&&/^[\+\-](.*)$/.test(options.maxDate)){options.maxDate=dateHelper.formatDate(_xdsoft_datetime.strToDateTime(options.maxDate),options.formatDate)} 91applyButton.toggle(options.showApplyButton);month_picker.find('.xdsoft_today_button').css('visibility',!options.todayButton?'hidden':'visible');month_picker.find('.'+options.prev).css('visibility',!options.prevButton?'hidden':'visible');month_picker.find('.'+options.next).css('visibility',!options.nextButton?'hidden':'visible');setMask(options);if(options.validateOnBlur){input.off('blur.xdsoft').on('blur.xdsoft',function(){if(options.allowBlank&&(!$.trim($(this).val()).length||(typeof options.mask=="string"&&$.trim($(this).val())===options.mask.replace(/[0-9]/g,'_')))){$(this).val(null);datetimepicker.data('xdsoft_datetime').empty()}else{var d=dateHelper.parseDate($(this).val(),options.format);if(d){$(this).val(dateHelper.formatDate(d,options.format))}else{var splittedHours=+([$(this).val()[0],$(this).val()[1]].join('')),splittedMinutes=+([$(this).val()[2],$(this).val()[3]].join(''));if(!options.datepicker&&options.timepicker&&splittedHours>=0&&splittedHours<24&&splittedMinutes>=0&&splittedMinutes<60){$(this).val([splittedHours,splittedMinutes].map(function(item){return item>9?item:'0'+item}).join(':'))}else{$(this).val(dateHelper.formatDate(_xdsoft_datetime.now(),options.format))}} 92datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val())} 93datetimepicker.trigger('changedatetime.xdsoft');datetimepicker.trigger('close.xdsoft')})} 94options.dayOfWeekStartPrev=(options.dayOfWeekStart===0)?6:options.dayOfWeekStart-1;datetimepicker.trigger('xchange.xdsoft').trigger('afterOpen.xdsoft')};datetimepicker.data('options',options).on('touchstart mousedown.xdsoft',function(event){event.stopPropagation();event.preventDefault();yearselect.hide();monthselect.hide();return!1});timeboxparent.append(timebox);timeboxparent.xdsoftScroller();datetimepicker.on('afterOpen.xdsoft',function(){timeboxparent.xdsoftScroller()});datetimepicker.append(datepicker).append(timepicker);if(options.withoutCopyright!==!0){datetimepicker.append(xdsoft_copyright)} 95datepicker.append(month_picker).append(calendar).append(applyButton);$(options.parentID).append(datetimepicker);XDSoft_datetime=function(){var _this=this;_this.now=function(norecursion){var d=new Date(),date,time;if(!norecursion&&options.defaultDate){date=_this.strToDateTime(options.defaultDate);d.setFullYear(date.getFullYear());d.setMonth(date.getMonth());d.setDate(date.getDate())} 96if(options.yearOffset){d.setFullYear(d.getFullYear()+options.yearOffset)} 97if(!norecursion&&options.defaultTime){time=_this.strtotime(options.defaultTime);d.setHours(time.getHours());d.setMinutes(time.getMinutes())} 98return d};_this.isValidDate=function(d){if(Object.prototype.toString.call(d)!=="[object Date]"){return!1} 99return!isNaN(d.getTime())};_this.setCurrentTime=function(dTime,requireValidDate){if(typeof dTime==='string'){_this.currentTime=_this.strToDateTime(dTime)}else if(_this.isValidDate(dTime)){_this.currentTime=dTime}else if(!dTime&&!requireValidDate&&options.allowBlank){_this.currentTime=null}else{_this.currentTime=_this.now()} 100datetimepicker.trigger('xchange.xdsoft')};_this.empty=function(){_this.currentTime=null};_this.getCurrentTime=function(dTime){return _this.currentTime};_this.nextMonth=function(){if(_this.currentTime===undefined||_this.currentTime===null){_this.currentTime=_this.now()} 101var month=_this.currentTime.getMonth()+1,year;if(month===12){_this.currentTime.setFullYear(_this.currentTime.getFullYear()+1);month=0} 102year=_this.currentTime.getFullYear();_this.currentTime.setDate(Math.min(new Date(_this.currentTime.getFullYear(),month+1,0).getDate(),_this.currentTime.getDate()));_this.currentTime.setMonth(month);if(options.onChangeMonth&&$.isFunction(options.onChangeMonth)){options.onChangeMonth.call(datetimepicker,_xdsoft_datetime.currentTime,datetimepicker.data('input'))} 103if(year!==_this.currentTime.getFullYear()&&$.isFunction(options.onChangeYear)){options.onChangeYear.call(datetimepicker,_xdsoft_datetime.currentTime,datetimepicker.data('input'))} 104datetimepicker.trigger('xchange.xdsoft');return month};_this.prevMonth=function(){if(_this.currentTime===undefined||_this.currentTime===null){_this.currentTime=_this.now()} 105var month=_this.currentTime.getMonth()-1;if(month===-1){_this.currentTime.setFullYear(_this.currentTime.getFullYear()-1);month=11} 106_this.currentTime.setDate(Math.min(new Date(_this.currentTime.getFullYear(),month+1,0).getDate(),_this.currentTime.getDate()));_this.currentTime.setMonth(month);if(options.onChangeMonth&&$.isFunction(options.onChangeMonth)){options.onChangeMonth.call(datetimepicker,_xdsoft_datetime.currentTime,datetimepicker.data('input'))} 107datetimepicker.trigger('xchange.xdsoft');return month};_this.getWeekOfYear=function(datetime){if(options.onGetWeekOfYear&&$.isFunction(options.onGetWeekOfYear)){var week=options.onGetWeekOfYear.call(datetimepicker,datetime);if(typeof week!=='undefined'){return week}} 108var onejan=new Date(datetime.getFullYear(),0,1);if(onejan.getDay()!=4) 109onejan.setMonth(0,1+((4-onejan.getDay()+7)%7));return Math.ceil((((datetime-onejan)/86400000)+onejan.getDay()+1)/7)};_this.strToDateTime=function(sDateTime){var tmpDate=[],timeOffset,currentTime;if(sDateTime&&sDateTime instanceof Date&&_this.isValidDate(sDateTime)){return sDateTime} 110tmpDate=/^(\+|\-)(.*)$/.exec(sDateTime);if(tmpDate){tmpDate[2]=dateHelper.parseDate(tmpDate[2],options.formatDate)} 111if(tmpDate&&tmpDate[2]){timeOffset=tmpDate[2].getTime()-(tmpDate[2].getTimezoneOffset())*60000;currentTime=new Date((_this.now(!0)).getTime()+parseInt(tmpDate[1]+'1',10)*timeOffset)}else{currentTime=sDateTime?dateHelper.parseDate(sDateTime,options.format):_this.now()} 112if(!_this.isValidDate(currentTime)){currentTime=_this.now()} 113return currentTime};_this.strToDate=function(sDate){if(sDate&&sDate instanceof Date&&_this.isValidDate(sDate)){return sDate} 114var currentTime=sDate?dateHelper.parseDate(sDate,options.formatDate):_this.now(!0);if(!_this.isValidDate(currentTime)){currentTime=_this.now(!0)} 115return currentTime};_this.strtotime=function(sTime){if(sTime&&sTime instanceof Date&&_this.isValidDate(sTime)){return sTime} 116var currentTime=sTime?dateHelper.parseDate(sTime,options.formatTime):_this.now(!0);if(!_this.isValidDate(currentTime)){currentTime=_this.now(!0)} 117return currentTime};_this.str=function(){return dateHelper.formatDate(_this.currentTime,options.format)};_this.currentTime=this.now()};_xdsoft_datetime=new XDSoft_datetime();applyButton.on('touchend click',function(e){e.preventDefault();datetimepicker.data('changed',!0);_xdsoft_datetime.setCurrentTime(getCurrentValue());input.val(_xdsoft_datetime.str());datetimepicker.trigger('close.xdsoft')});month_picker.find('.xdsoft_today_button').on('touchend mousedown.xdsoft',function(){datetimepicker.data('changed',!0);_xdsoft_datetime.setCurrentTime(0,!0);datetimepicker.trigger('afterOpen.xdsoft')}).on('dblclick.xdsoft',function(){var currentDate=_xdsoft_datetime.getCurrentTime(),minDate,maxDate;currentDate=new Date(currentDate.getFullYear(),currentDate.getMonth(),currentDate.getDate());minDate=_xdsoft_datetime.strToDate(options.minDate);minDate=new Date(minDate.getFullYear(),minDate.getMonth(),minDate.getDate());if(currentDate<minDate){return} 118maxDate=_xdsoft_datetime.strToDate(options.maxDate);maxDate=new Date(maxDate.getFullYear(),maxDate.getMonth(),maxDate.getDate());if(currentDate>maxDate){return} 119input.val(_xdsoft_datetime.str());input.trigger('change');datetimepicker.trigger('close.xdsoft')});month_picker.find('.xdsoft_prev,.xdsoft_next').on('touchend mousedown.xdsoft',function(){var $this=$(this),timer=0,stop=!1;(function arguments_callee1(v){if($this.hasClass(options.next)){_xdsoft_datetime.nextMonth()}else if($this.hasClass(options.prev)){_xdsoft_datetime.prevMonth()}
120if(options.monthChangeSpinner){if(!stop){timer=setTimeout(arguments_callee1,v||100)}}}(500));$([document.body,window]).on('touchend mouseup.xdsoft',function arguments_callee2(){clearTimeout(timer);stop=!0;$([document.body,window]).off('touchend mouseup.xdsoft',arguments_callee2)})});timepicker.find('.xdsoft_prev,.xdsoft_next').on('touchend mousedown.xdsoft',function(){var $this=$(this),timer=0,stop=!1,period=110;(function arguments_callee4(v){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){timebox.css('marginTop','-'+(top+options.timeHeightInTimePicker)+'px')}else if($this.hasClass(options.prev)&&top-options.timeHeightInTimePicker>=0){timebox.css('marginTop','-'+(top-options.timeHeightInTimePicker)+'px')} 121timeboxparent.trigger('scroll_element.xdsoft_scroller',[Math.abs(parseInt(timebox[0].style.marginTop,10)/(height-pheight))]);period=(period>10)?10:period-10;if(!stop){timer=setTimeout(arguments_callee4,v||period)}}(500));$([document.body,window]).on('touchend mouseup.xdsoft',function arguments_callee5(){clearTimeout(timer);stop=!0;$([document.body,window]).off('touchend mouseup.xdsoft',arguments_callee5)})});xchangeTimer=0;datetimepicker.on('xchange.xdsoft',function(event){clearTimeout(xchangeTimer);xchangeTimer=setTimeout(function(){if(_xdsoft_datetime.currentTime===undefined||_xdsoft_datetime.currentTime===null){if(options.allowBlank) 122return;_xdsoft_datetime.currentTime=_xdsoft_datetime.now()} 123var table='',start=new Date(_xdsoft_datetime.currentTime.getFullYear(),_xdsoft_datetime.currentTime.getMonth(),1,12,0,0),i=0,j,today=_xdsoft_datetime.now(),maxDate=!1,minDate=!1,hDate,day,d,y,m,w,classes=[],customDateSettings,newRow=!0,time='',h='',line_time,description;while(start.getDay()!==options.dayOfWeekStart){start.setDate(start.getDate()-1)} 124table+='<table><thead><tr>';if(options.weeks){table+='<th></th>'} 125for(j=0;j<7;j+=1){table+='<th>'+options.i18n[globalLocale].dayOfWeekShort[(j+options.dayOfWeekStart)%7]+'</th>'} 126table+='</tr></thead>';table+='<tbody>';if(options.maxDate!==!1){maxDate=_xdsoft_datetime.strToDate(options.maxDate);maxDate=new Date(maxDate.getFullYear(),maxDate.getMonth(),maxDate.getDate(),23,59,59,999)} 127if(options.minDate!==!1){minDate=_xdsoft_datetime.strToDate(options.minDate);minDate=new Date(minDate.getFullYear(),minDate.getMonth(),minDate.getDate())} 128while(i<_xdsoft_datetime.currentTime.countDaysInMonth()||start.getDay()!==options.dayOfWeekStart||_xdsoft_datetime.currentTime.getMonth()===start.getMonth()){classes=[];i+=1;day=start.getDay();d=start.getDate();y=start.getFullYear();m=start.getMonth();w=_xdsoft_datetime.getWeekOfYear(start);description='';classes.push('xdsoft_date');if(options.beforeShowDay&&$.isFunction(options.beforeShowDay.call)){customDateSettings=options.beforeShowDay.call(datetimepicker,start)}else{customDateSettings=null} 129if(options.allowDateRe&&Object.prototype.toString.call(options.allowDateRe)==="[object RegExp]"){if(!options.allowDateRe.test(dateHelper.formatDate(start,options.formatDate))){classes.push('xdsoft_disabled')}}else if(options.allowDates&&options.allowDates.length>0){if(options.allowDates.indexOf(dateHelper.formatDate(start,options.formatDate))===-1){classes.push('xdsoft_disabled')}}else if((maxDate!==!1&&start>maxDate)||(minDate!==!1&&start<minDate)||(customDateSettings&&customDateSettings[0]===!1)){classes.push('xdsoft_disabled')}else if(options.disabledDates.indexOf(dateHelper.formatDate(start,options.formatDate))!==-1){classes.push('xdsoft_disabled')}else if(options.disabledWeekDays.indexOf(day)!==-1){classes.push('xdsoft_disabled')}else if(input.is('[readonly]')){classes.push('xdsoft_disabled')} 130if(customDateSettings&&customDateSettings[1]!==""){classes.push(customDateSettings[1])} 131if(_xdsoft_datetime.currentTime.getMonth()!==m){classes.push('xdsoft_other_month')} 132if((options.defaultSelect||datetimepicker.data('changed'))&&dateHelper.formatDate(_xdsoft_datetime.currentTime,options.formatDate)===dateHelper.formatDate(start,options.formatDate)){classes.push('xdsoft_current')} 133if(dateHelper.formatDate(today,options.formatDate)===dateHelper.formatDate(start,options.formatDate)){classes.push('xdsoft_today')} 134if(start.getDay()===0||start.getDay()===6||options.weekends.indexOf(dateHelper.formatDate(start,options.formatDate))!==-1){classes.push('xdsoft_weekend')} 135if(options.highlightedDates[dateHelper.formatDate(start,options.formatDate)]!==undefined){hDate=options.highlightedDates[dateHelper.formatDate(start,options.formatDate)];classes.push(hDate.style===undefined?'xdsoft_highlighted_default':hDate.style);description=hDate.desc===undefined?'':hDate.desc} 136if(options.beforeShowDay&&$.isFunction(options.beforeShowDay)){classes.push(options.beforeShowDay(start))} 137if(newRow){table+='<tr>';newRow=!1;if(options.weeks){table+='<th>'+w+'</th>'}} 138table+='<td data-date="'+d+'" data-month="'+m+'" data-year="'+y+'"'+' class="xdsoft_date xdsoft_day_of_week'+start.getDay()+' '+classes.join(' ')+'" title="'+description+'">'+'<div>'+d+'</div>'+'</td>';if(start.getDay()===options.dayOfWeekStartPrev){table+='</tr>';newRow=!0}
138 139start.setDate(d+1)} 140table+='</tbody></table>';calendar.html(table);month_picker.find('.xdsoft_label span').eq(0).text(options.i18n[globalLocale].months[_xdsoft_datetime.currentTime.getMonth()]);month_picker.find('.xdsoft_label span').eq(1).text(_xdsoft_datetime.currentTime.getFullYear());time='';h='';m='';line_time=function line_time(h,m){var now=_xdsoft_datetime.now(),optionDateTime,current_time,isALlowTimesInit=options.allowTimes&&$.isArray(options.allowTimes)&&options.allowTimes.length;now.setHours(h);h=parseInt(now.getHours(),10);now.setMinutes(m);m=parseInt(now.getMinutes(),10);optionDateTime=new Date(_xdsoft_datetime.currentTime);optionDateTime.setHours(h);optionDateTime.setMinutes(m);classes=[];if((options.minDateTime!==!1&&options.minDateTime>optionDateTime)||(options.maxTime!==!1&&_xdsoft_datetime.strtotime(options.maxTime).getTime()<now.getTime())||(options.minTime!==!1&&_xdsoft_datetime.strtotime(options.minTime).getTime()>now.getTime())){classes.push('xdsoft_disabled')}else if((options.minDateTime!==!1&&options.minDateTime>optionDateTime)||((options.disabledMinTime!==!1&&now.getTime()>_xdsoft_datetime.strtotime(options.disabledMinTime).getTime())&&(options.disabledMaxTime!==!1&&now.getTime()<_xdsoft_datetime.strtotime(options.disabledMaxTime).getTime()))){classes.push('xdsoft_disabled')}else if(input.is('[readonly]')){classes.push('xdsoft_disabled')} 141current_time=new Date(_xdsoft_datetime.currentTime);current_time.setHours(parseInt(_xdsoft_datetime.currentTime.getHours(),10));if(!isALlowTimesInit){current_time.setMinutes(Math[options.roundTime](_xdsoft_datetime.currentTime.getMinutes()/options.step)*options.step)} 142if((options.initTime||options.defaultSelect||datetimepicker.data('changed'))&¤t_time.getHours()===parseInt(h,10)&&((!isALlowTimesInit&&options.step>59)||current_time.getMinutes()===parseInt(m,10))){if(options.defaultSelect||datetimepicker.data('changed')){classes.push('xdsoft_current')}else if(options.initTime){classes.push('xdsoft_init_time')}} 143if(parseInt(today.getHours(),10)===parseInt(h,10)&&parseInt(today.getMinutes(),10)===parseInt(m,10)){classes.push('xdsoft_today')} 144time+='<div class="xdsoft_time '+classes.join(' ')+'" data-hour="'+h+'" data-minute="'+m+'">'+dateHelper.formatDate(now,options.formatTime)+'</div>'};if(!options.allowTimes||!$.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){h=(i<10?'0':'')+i;m=(j<10?'0':'')+j;line_time(h,m)}}}else{for(i=0;i<options.allowTimes.length;i+=1){h=_xdsoft_datetime.strtotime(options.allowTimes[i]).getHours();m=_xdsoft_datetime.strtotime(options.allowTimes[i]).getMinutes();line_time(h,m)}} 145timebox.html(time);opt='';i=0;for(i=parseInt(options.yearStart,10)+options.yearOffset;i<=parseInt(options.yearEnd,10)+options.yearOffset;i+=1){opt+='<div class="xdsoft_option '+(_xdsoft_datetime.currentTime.getFullYear()===i?'xdsoft_current':'')+'" data-value="'+i+'">'+i+'</div>'} 146yearselect.children().eq(0).html(opt);for(i=parseInt(options.monthStart,10),opt='';i<=parseInt(options.monthEnd,10);i+=1){opt+='<div class="xdsoft_option '+(_xdsoft_datetime.currentTime.getMonth()===i?'xdsoft_current':'')+'" data-value="'+i+'">'+options.i18n[globalLocale].months[i]+'</div>'} 147monthselect.children().eq(0).html(opt);$(datetimepicker).trigger('generate.xdsoft')},10);event.stopPropagation()}).on('afterOpen.xdsoft',function(){if(options.timepicker){var classType,pheight,height,top;if(timebox.find('.xdsoft_current').length){classType='.xdsoft_current'}else if(timebox.find('.xdsoft_init_time').length){classType='.xdsoft_init_time'} 148if(classType){pheight=timeboxparent[0].clientHeight;height=timebox[0].offsetHeight;top=timebox.find(classType).index()*options.timeHeightInTimePicker+1;if((height-pheight)<top){top=height-pheight} 149timeboxparent.trigger('scroll_element.xdsoft_scroller',[parseInt(top,10)/(height-pheight)])}else{timeboxparent.trigger('scroll_element.xdsoft_scroller',[0])}}});timerclick=0;calendar.on('touchend click.xdsoft','td',function(xdevent){xdevent.stopPropagation();timerclick+=1;var $this=$(this),currentTime=_xdsoft_datetime.currentTime;if(currentTime===undefined||currentTime===null){_xdsoft_datetime.currentTime=_xdsoft_datetime.now();currentTime=_xdsoft_datetime.currentTime} 150if($this.hasClass('xdsoft_disabled')){return!1} 151currentTime.setDate(1);currentTime.setFullYear($this.data('year'));currentTime.setMonth($this.data('month'));currentTime.setDate($this.data('date'));datetimepicker.trigger('select.xdsoft',[currentTime]);input.val(_xdsoft_datetime.str());if(options.onSelectDate&&$.isFunction(options.onSelectDate)){options.onSelectDate.call(datetimepicker,_xdsoft_datetime.currentTime,datetimepicker.data('input'),xdevent)} 152datetimepicker.data('changed',!0);datetimepicker.trigger('xchange.xdsoft');datetimepicker.trigger('changedatetime.xdsoft');if((timerclick>1||(options.closeOnDateSelect===!0||(options.closeOnDateSelect===!1&&!options.timepicker)))&&!options.inline){datetimepicker.trigger('close.xdsoft')} 153setTimeout(function(){timerclick=0},200)});timebox.on('touchmove','div',function(){currentlyScrollingTimeDiv=!0}).on('touchend click.xdsoft','div',function(xdevent){xdevent.stopPropagation();if(currentlyScrollingTimeDiv){currentlyScrollingTimeDiv=!1;return} 154var $this=$(this),currentTime=_xdsoft_datetime.currentTime;if(currentTime===undefined||currentTime===null){_xdsoft_datetime.currentTime=_xdsoft_datetime.now();currentTime=_xdsoft_datetime.currentTime} 155if($this.hasClass('xdsoft_disabled')){return!1} 156currentTime.setHours($this.data('hour'));currentTime.setMinutes($this.data('minute'));datetimepicker.trigger('select.xdsoft',[currentTime]);datetimepicker.data('input').val(_xdsoft_datetime.str());if(options.onSelectTime&&$.isFunction(options.onSelectTime)){options.onSelectTime.call(datetimepicker,_xdsoft_datetime.currentTime,datetimepicker.data('input'),xdevent)} 157datetimepicker.data('changed',!0);datetimepicker.trigger('xchange.xdsoft');datetimepicker.trigger('changedatetime.xdsoft');if(options.inline!==!0&&options.closeOnTimeSelect===!0){datetimepicker.trigger('close.xdsoft')}});datepicker.on('mousewheel.xdsoft',function(event){if(!options.scrollMonth){return!0} 158if(event.deltaY<0){_xdsoft_datetime.nextMonth()}else{_xdsoft_datetime.prevMonth()} 159return!1});input.on('mousewheel.xdsoft',function(event){if(!options.scrollInput){return!0} 160if(!options.datepicker&&options.timepicker){current_time_index=timebox.find('.xdsoft_current').length?timebox.find('.xdsoft_current').eq(0).index():0;if(current_time_index+event.deltaY>=0&¤t_time_index+event.deltaY<timebox.children().length){current_time_index+=event.deltaY} 161if(timebox.children().eq(current_time_index).length){timebox.children().eq(current_time_index).trigger('mousedown')} 162return!1} 163if(options.datepicker&&!options.timepicker){datepicker.trigger(event,[event.deltaY,event.deltaX,event.deltaY]);if(input.val){input.val(_xdsoft_datetime.str())} 164datetimepicker.trigger('changedatetime.xdsoft');return!1}});datetimepicker.on('changedatetime.xdsoft',function(event){if(options.onChangeDateTime&&$.isFunction(options.onChangeDateTime)){var $input=datetimepicker.data('input');options.onChangeDateTime.call(datetimepicker,_xdsoft_datetime.currentTime,$input,event);delete options.value;$input.trigger('change')}}).on('generate.xdsoft',function(){if(options.onGenerate&&$.isFunction(options.onGenerate)){options.onGenerate.call(datetimepicker,_xdsoft_datetime.currentTime,datetimepicker.data('input'))} 165if(triggerAfterOpen){datetimepicker.trigger('afterOpen.xdsoft');triggerAfterOpen=!1}}).on('click.xdsoft',function(xdevent){xdevent.stopPropagation()});current_time_index=0;forEachAncestorOf=function(node,callback){do{node=node.parentNode;if(callback(node)===!1){break}}while(node.nodeName!=='HTML');};setPos=function(){var dateInputOffset,dateInputElem,verticalPosition,left,position,datetimepickerElem,dateInputHasFixedAncestor,$dateInput,windowWidth,verticalAnchorEdge,datetimepickerCss,windowHeight,windowScrollTop;$dateInput=datetimepicker.data('input');dateInputOffset=$dateInput.offset();dateInputElem=$dateInput[0];verticalAnchorEdge='top';verticalPosition=(dateInputOffset.top+dateInputElem.offsetHeight)-1;left=dateInputOffset.left;position="absolute";windowWidth=$(window).width();windowHeight=$(window).height();windowScrollTop=$(window).scrollTop();if((document.documentElement.clientWidth-dateInputOffset.left)<datepicker.parent().outerWidth(!0)){var diff=datepicker.parent().outerWidth(!0)-dateInputElem.offsetWidth;left=left-diff} 166if($dateInput.parent().css('direction')==='rtl'){left-=(datetimepicker.outerWidth()-$dateInput.outerWidth())} 167if(options.fixed){verticalPosition-=windowScrollTop;left-=$(window).scrollLeft();position="fixed"}else{dateInputHasFixedAncestor=!1;forEachAncestorOf(dateInputElem,function(ancestorNode){if(window.getComputedStyle(ancestorNode).getPropertyValue('position')==='fixed'){dateInputHasFixedAncestor=!0;return!1}});if(dateInputHasFixedAncestor){position='fixed';if(verticalPosition+datetimepicker.outerHeight()>windowHeight+windowScrollTop){verticalAnchorEdge='bottom';verticalPosition=(windowHeight+windowScrollTop)-dateInputOffset.top}else{verticalPosition-=windowScrollTop}}else{if(verticalPosition+dateInputElem.offsetHeight>windowHeight+windowScrollTop){verticalPosition=dateInputOffset.top-dateInputElem.offsetHeight+1}} 168if(verticalPosition<0){verticalPosition=0} 169if(left+dateInputElem.offsetWidth>windowWidth){left=windowWidth-dateInputElem.offsetWidth}} 170datetimepickerElem=datetimepicker[0];forEachAncestorOf(datetimepickerElem,function(ancestorNode){var ancestorNodePosition;ancestorNodePosition=window.getComputedStyle(ancestorNode).getPropertyValue('position');if(ancestorNodePosition==='relative'&&windowWidth>=ancestorNode.offsetWidth){left=left-((windowWidth-ancestorNode.offsetWidth)/2);return!1}});datetimepickerCss={position:position,left:left,top:'',bottom:''};datetimepickerCss[verticalAnchorEdge]=verticalPosition;datetimepicker.css(datetimepickerCss)};datetimepicker.on('open.xdsoft',function(event){var onShow=!0;if(options.onShow&&$.isFunction(options.onShow)){onShow=options.onShow.call(
170datetimepicker,_xdsoft_datetime.currentTime,datetimepicker.data('input'),event)} 171if(onShow!==!1){datetimepicker.show();setPos();$(window).off('resize.xdsoft',setPos).on('resize.xdsoft',setPos);if(options.closeOnWithoutClick){$([document.body,window]).on('touchstart mousedown.xdsoft',function arguments_callee6(){datetimepicker.trigger('close.xdsoft');$([document.body,window]).off('touchstart mousedown.xdsoft',arguments_callee6)})}}}).on('close.xdsoft',function(event){var onClose=!0;month_picker.find('.xdsoft_month,.xdsoft_year').find('.xdsoft_select').hide();if(options.onClose&&$.isFunction(options.onClose)){onClose=options.onClose.call(datetimepicker,_xdsoft_datetime.currentTime,datetimepicker.data('input'),event)} 172if(onClose!==!1&&!options.opened&&!options.inline){datetimepicker.hide()} 173event.stopPropagation()}).on('toggle.xdsoft',function(){if(datetimepicker.is(':visible')){datetimepicker.trigger('close.xdsoft')}else{datetimepicker.trigger('open.xdsoft')}}).data('input',input);timer=0;datetimepicker.data('xdsoft_datetime',_xdsoft_datetime);datetimepicker.setOptions(options);function getCurrentValue(){var ct=!1,time;if(options.startDate){ct=_xdsoft_datetime.strToDate(options.startDate)}else{ct=options.value||((input&&input.val&&input.val())?input.val():'');if(ct){ct=_xdsoft_datetime.strToDateTime(ct)}else if(options.defaultDate){ct=_xdsoft_datetime.strToDateTime(options.defaultDate);if(options.defaultTime){time=_xdsoft_datetime.strtotime(options.defaultTime);ct.setHours(time.getHours());ct.setMinutes(time.getMinutes())}}} 174if(ct&&_xdsoft_datetime.isValidDate(ct)){datetimepicker.data('changed',!0)}else{ct=''} 175return ct||0} 176function setMask(options){var isValidValue=function(mask,value){var reg=mask.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(reg)).test(value)},getCaretPos=function(input){try{if(document.selection&&document.selection.createRange){var range=document.selection.createRange();return range.getBookmark().charCodeAt(2)-2} 177if(input.setSelectionRange){return input.selectionStart}}catch(e){return 0}},setCaretPos=function(node,pos){node=(typeof node==="string"||node instanceof String)?document.getElementById(node):node;if(!node){return!1} 178if(node.createTextRange){var textRange=node.createTextRange();textRange.collapse(!0);textRange.moveEnd('character',pos);textRange.moveStart('character',pos);textRange.select();return!0} 179if(node.setSelectionRange){node.setSelectionRange(pos,pos);return!0} 180return!1};if(options.mask){input.off('keydown.xdsoft')} 181if(options.mask===!0){if(typeof moment!='undefined'){options.mask=options.format.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')}else{options.mask=options.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')}} 182if($.type(options.mask)==='string'){if(!isValidValue(options.mask,input.val())){input.val(options.mask.replace(/[0-9]/g,'_'));setCaretPos(input[0],0)} 183input.on('keydown.xdsoft',function(event){var val=this.value,key=event.which,pos,digit;if(((key>=KEY0&&key<=KEY9)||(key>=_KEY0&&key<=_KEY9))||(key===BACKSPACE||key===DEL)){pos=getCaretPos(this);digit=(key!==BACKSPACE&&key!==DEL)?String.fromCharCode((_KEY0<=key&&key<=_KEY9)?key-KEY0:key):'_';if((key===BACKSPACE||key===DEL)&&pos){pos-=1;digit='_'} 184while(/[^0-9_]/.test(options.mask.substr(pos,1))&&pos<options.mask.length&&pos>0){pos+=(key===BACKSPACE||key===DEL)?-1:1} 185val=val.substr(0,pos)+digit+val.substr(pos+1);if($.trim(val)===''){val=options.mask.replace(/[0-9]/g,'_')}else{if(pos===options.mask.length){event.preventDefault();return!1}} 186pos+=(key===BACKSPACE||key===DEL)?0:1;while(/[^0-9_]/.test(options.mask.substr(pos,1))&&pos<options.mask.length&&pos>0){pos+=(key===BACKSPACE||key===DEL)?-1:1} 187if(isValidValue(options.mask,val)){this.value=val;setCaretPos(this,pos)}else if($.trim(val)===''){this.value=options.mask.replace(/[0-9]/g,'_')}else{input.trigger('error_input.xdsoft')}}else{if(([AKEY,CKEY,VKEY,ZKEY,YKEY].indexOf(key)!==-1&&ctrlDown)||[ESC,ARROWUP,ARROWDOWN,ARROWLEFT,ARROWRIGHT,F5,
187CTRLKEY,TAB,ENTER].indexOf(key)!==-1){return!0}} 188event.preventDefault();return!1})}} 189_xdsoft_datetime.setCurrentTime(getCurrentValue());input.data('xdsoft_datetimepicker',datetimepicker).on('open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart',function(){if(input.is(':disabled')||(input.data('xdsoft_datetimepicker').is(':visible')&&options.closeOnInputClick)){return} 190clearTimeout(timer);timer=setTimeout(function(){if(input.is(':disabled')){return} 191triggerAfterOpen=!0;_xdsoft_datetime.setCurrentTime(getCurrentValue(),!0);if(options.mask){setMask(options)} 192datetimepicker.trigger('open.xdsoft')},100)}).on('keydown.xdsoft',function(event){var elementSelector,key=event.which;if([ENTER].indexOf(key)!==-1&&options.enterLikeTab){elementSelector=$("input:visible,textarea:visible,button:visible,a:visible");datetimepicker.trigger('close.xdsoft');elementSelector.eq(elementSelector.index(this)+1).focus();return!1} 193if([TAB].indexOf(key)!==-1){datetimepicker.trigger('close.xdsoft');return!0}}).on('blur.xdsoft',function(){datetimepicker.trigger('close.xdsoft')})};destroyDateTimePicker=function(input){var datetimepicker=input.data('xdsoft_datetimepicker');if(datetimepicker){datetimepicker.data('xdsoft_datetime',null);datetimepicker.remove();input.data('xdsoft_datetimepicker',null).off('.xdsoft');$(window).off('resize.xdsoft');$([window,document.body]).off('mousedown.xdsoft touchstart');if(input.unmousewheel){input.unmousewheel()}}};$(document).off('keydown.xdsoftctrl keyup.xdsoftctrl').on('keydown.xdsoftctrl',function(e){if(e.keyCode===CTRLKEY){ctrlDown=!0}}).on('keyup.xdsoftctrl',function(e){if(e.keyCode===CTRLKEY){ctrlDown=!1}});this.each(function(){var datetimepicker=$(this).data('xdsoft_datetimepicker'),$input;if(datetimepicker){if($.type(opt)==='string'){switch(opt){case 'show':$(this).select().focus();datetimepicker.trigger('open.xdsoft');break;case 'hide':datetimepicker.trigger('close.xdsoft');break;case 'toggle':datetimepicker.trigger('toggle.xdsoft');break;case 'destroy':destroyDateTimePicker($(this));break;case 'reset':this.value=this.defaultValue;if(!this.value||!datetimepicker.data('xdsoft_datetime').isValidDate(dateHelper.parseDate(this.value,options.format))){datetimepicker.data('changed',!1)} 194datetimepicker.data('xdsoft_datetime').setCurrentTime(this.value);break;case 'validate':$input=datetimepicker.data('input');$input.trigger('blur.xdsoft');break;default:if(datetimepicker[opt]&&$.isFunction(datetimepicker[opt])){result=datetimepicker[opt](opt2)}}}else{datetimepicker.setOptions(opt)} 195return 0} 196if($.type(opt)!=='string'){if(!options.lazyInit||options.open||options.inline){createDateTimePicker($(this))}else{lazyInit($(this))}}});return result};$.fn.datetimepicker.defaults=default_options;function HighlightedDate(date,desc,style){"use strict";this.date=date;this.desc=desc;this.style=style}})); 197/*! 198 * jQuery Mousewheel 3.1.13 199 * 200 * Copyright jQuery Foundation and other contributors 201 * Released under the MIT license 202 * http://jquery.org/license 203 */ 204(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else if(typeof exports==='object'){module.exports=factory}else{factory(jQuery)}}(function($){var toFix=['wheel','mousewheel','DOMMouseScroll','MozMousePixelScroll'],toBind=('onwheel' in document||document.documentMode>=9)?['wheel']:['mousewheel','DomMouseScroll','MozMousePixelScroll'],slice=Array.prototype.slice,nullLowestDeltaTimeout,lowestDelta;if($.event.fixHooks){for(var i=toFix.length;i;){$.event.fixHooks[toFix[--i]]=$.event.mouseHooks}} 205var special=$.event.special.mousewheel={version:'3.1.12',setup:function(){if(this.addEventListener){for(var i=toBind.length;i;){this.addEventListener(toBind[--i],handler,!1)}}else{this.onmousewheel=handler} 206$.data(this,'mousewheel-line-height',special.getLineHeight(this));$.data(this,'mousewheel-page-height',special.getPageHeight(this))},teardown:function(){if(this.removeEventListener){for(var i=toBind.length;i;){this.removeEventListener(toBind[--i],handler,!1)}}else{this.onmousewheel=null} 207$.removeData(this,'mousewheel-line-height');$.removeData(this,'mousewheel-page-height')},getLineHeight:function(elem){var $elem=$(elem),$parent=$elem['offsetParent' in $.fn?'offsetParent':'parent']();if(!$parent.length){$parent=$('body')} 208return parseInt($parent.css('fontSize'),10)||parseInt($elem.css('fontSize'),10)||16},getPageHeight:function(elem){return $(elem).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};$.fn.extend({mousewheel:function(fn){return fn?this.bind('mousewheel',fn):this.trigger('mousewheel')},unmousewheel:function(fn){return this.unbind('mousewheel',fn)}});function handler(event){var orgEvent=event||window.event,args=slice.call(arguments,1
208),delta=0,deltaX=0,deltaY=0,absDelta=0,offsetX=0,offsetY=0;event=$.event.fix(orgEvent);event.type='mousewheel';if('detail' in orgEvent){deltaY=orgEvent.detail*-1} 209if('wheelDelta' in orgEvent){deltaY=orgEvent.wheelDelta} 210if('wheelDeltaY' in orgEvent){deltaY=orgEvent.wheelDeltaY} 211if('wheelDeltaX' in orgEvent){deltaX=orgEvent.wheelDeltaX*-1} 212if('axis' in orgEvent&&orgEvent.axis===orgEvent.HORIZONTAL_AXIS){deltaX=deltaY*-1;deltaY=0} 213delta=deltaY===0?deltaX:deltaY;if('deltaY' in orgEvent){deltaY=orgEvent.deltaY*-1;delta=deltaY} 214if('deltaX' in orgEvent){deltaX=orgEvent.deltaX;if(deltaY===0){delta=deltaX*-1}} 215if(deltaY===0&&deltaX===0){return} 216if(orgEvent.deltaMode===1){var lineHeight=$.data(this,'mousewheel-line-height');delta*=lineHeight;deltaY*=lineHeight;deltaX*=lineHeight}else if(orgEvent.deltaMode===2){var pageHeight=$.data(this,'mousewheel-page-height');delta*=pageHeight;deltaY*=pageHeight;deltaX*=pageHeight} 217absDelta=Math.max(Math.abs(deltaY),Math.abs(deltaX));if(!lowestDelta||absDelta<lowestDelta){lowestDelta=absDelta;if(shouldAdjustOldDeltas(orgEvent,absDelta)){lowestDelta/=40}} 218if(shouldAdjustOldDeltas(orgEvent,absDelta)){delta/=40;deltaX/=40;deltaY/=40} 219delta=Math[delta>=1?'floor':'ceil'](delta/lowestDelta);deltaX=Math[deltaX>=1?'floor':'ceil'](deltaX/lowestDelta);deltaY=Math[deltaY>=1?'floor':'ceil'](deltaY/lowestDelta);if(special.settings.normalizeOffset&&this.getBoundingClientRect){var boundingRect=this.getBoundingClientRect();offsetX=event.clientX-boundingRect.left;offsetY=event.clientY-boundingRect.top} 220event.deltaX=deltaX;event.deltaY=deltaY;event.deltaFactor=lowestDelta;event.offsetX=offsetX;event.offsetY=offsetY;event.deltaMode=0;args.unshift(event,delta,deltaX,deltaY);if(nullLowestDeltaTimeout){clearTimeout(nullLowestDeltaTimeout)} 221nullLowestDeltaTimeout=setTimeout(nullLowestDelta,200);return($.event.dispatch||$.event.handle).apply(this,args)} 222function nullLowestDelta(){lowestDelta=null} 223function shouldAdjustOldDeltas(orgEvent,absDelta){return special.settings.adjustOldDeltas&&orgEvent.type==='mousewheel'&&absDelta%120===0}}))
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.