/home/awneajlw/www/wp-content/themes/codz/assets/js/jquery.simple-dtpicker.min.js
/**
* jquery-simple-datetimepicker (jquery.simple-dtpicker.min.js)
* v1.12.0
* (c) Masanori Ohgita - 2014.
* https://github.com/mugifly/jquery-simple-datetimepicker
*/
!function(e){var t={en:{days:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],sep:"-",format:"YYYY-MM-DD hh:mm",prevMonth:"Previous month",nextMonth:"Next month",today:"Today"},ro:{days:["Dum","Lun","Mar","Mie","Joi","Vin","Sâm"],months:["Ian","Feb","Mar","Apr","Mai","Iun","Iul","Aug","Sep","Oct","Nov","Dec"],sep:".",format:"DD.MM.YYYY hh:mm",prevMonth:"Luna precedentă",nextMonth:"Luna următoare",today:"Azi"},ja:{days:["日","月","火","水","木","金","土"],months:["01","02","03","04","05","06","07","08","09","10","11","12"],sep:"/",format:"YYYY/MM/DD hh:mm"},ru:{days:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],months:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],format:"DD.MM.YYYY hh:mm"},br:{days:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],format:"DD/MM/YYYY hh:mm"},pt:{days:["dom","seg","ter","qua","qui","sex","sáb"],months:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},cn:{days:["日","一","二","三","四","五","六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},de:{days:["So","Mo","Di","Mi","Do","Fr","Sa"],months:["Jan","Feb","März","Apr","Mai","Juni","Juli","Aug","Sept","Okt","Nov","Dez"],format:"DD.MM.YYYY hh:mm"},sv:{days:["Sö","Må","Ti","On","To","Fr","Lö"],months:["Jan","Feb","Mar","Apr","Maj","Juni","Juli","Aug","Sept","Okt","Nov","Dec"]},id:{days:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],months:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agu","Sep","Okt","Nov","Des"]},it:{days:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],months:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],format:"DD/MM/YYYY hh:mm"},tr:{days:["Pz","Pzt","Sal","Çar","Per","Cu","Cts"],months:["Ock","Şub","Mar","Nis","May","Haz","Tem","Agu","Eyl","Ekm","Kas","Arlk"]},es:{days:["dom","lun","mar","miér","jue","vié","sáb"],months:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],format:"DD/MM/YYYY hh:mm"},ko:{days:["일","월","화","수","목","금","토"],months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},nl:{days:["zo","ma","di","wo","do","vr","za"],months:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],format:"DD-MM-YYYY hh:mm"},cz:{days:["Ne","Po","Út","St","Čt","Pá","So"],months:["Led","Úno","Bře","Dub","Kvě","Čer","Čvc","Srp","Zář","Říj","Lis","Pro"],format:"DD.MM.YYYY hh:mm"},fr:{days:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],format:"DD-MM-YYYY hh:mm"},pl:{days:["N","Pn","Wt","Śr","Cz","Pt","So"],months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],sep:"-",format:"YYYY-MM-DD hh:mm",prevMonth:"Poprzedni miesiąc",nextMonth:"Następny miesiąc",today:"Dzisiaj"},gr:{days:["Κυ","Δε","Τρ","Τε","Πε","Πα","Σα"],months:["Ιαν","Φεβ","Μαρ","Απρ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],sep:"-",format:"DD-MM-YYYY hh:mm",prevMonth:"Προηγ. μήνας",nextMonth:"Επόμ. μήνας",today:"Σήμερα"}},a=function(e,t){this.$pickerObject=e,this.$inputObject=t};a.prototype.getPicker=function(){return this.$pickerObject},a.prototype.getInput=function(){return this.$inputObject},a.prototype.isShow=function(){var e=!0;return"none"==this.$pickerObject.css("display")&&(e=!1),e},a.prototype.show=function(){var e=this.$pickerObject,t=this.$inputObject;e.show(),r=t.data("pickerId"),null!=t&&!1===e.data("isInline")&&this._relocate()},a.prototype.hide=function(){var e=this.$pickerObject;this.$inputObject;e.hide()},a.prototype.getDate=function(){var e=this.$pickerObject;this.$inputObject;return v(e)},a.prototype.setDate=function(e){var t=this.$pickerObject;this.$inputObject;w("Date",e)||(e=new Date(e)),M(t,{isAnim:!0,isOutputToInputObject:!0},e)},a.prototype.destroy=function(){var e=this.$pickerObject,t=e.data("pickerId");n[t]=null,e.remove()},a.prototype._relocate=function(){var t=this.$pickerObject,a=this.$inputObject;if(null!=a&&!1===t.data("isInline")){var n=a.outerHeight({margin:!0});w("Number",n)||(n=a.outerHeight());var i=t.outerHeight({margin:!0});w("Number",i)||(i=t.outerHeight()),parseInt(e(window).height())<=a.offset().top-e(document).scrollTop()+n+i?t.parent().css("top",a.offset().top-n/2-i+"px"):t.parent().css("top",a.offset().top+n+"px"),t.parent().css("left",a.offset().left+"px"),t.parent().css("z-index",1e5)}};var n=[],i=[],r=-1,o=function(t){return e(t).closest(".datepicker")},l=function(t){var a=o(t);return null!=a.data("inputObjectId")?e(i[a.data("inputObjectId")]):null},d=function(e){var t=o(e),a=new Date;y(t,{isAnim:!0,isOutputToInputObject:!0},a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes())},s=function(e){var t=o(e);if(!1!==t.data("stateAllowBeforeMonth")){var a=v(t),n=new Date(a.getFullYear(),a.getMonth(),0).getDate();n<a.getDate()&&a.setDate(n),y(t,{isAnim:!0,isOutputToInputObject:!0},a.getFullYear(),a.getMonth()-1,a.getDate(),a.getHours(),a.getMinutes());var i=new Date;i.getFullYear()==a.getFullYear()&&i.getMonth()==a.getMonth()&&t.data("futureOnly")||(n<a.getDate()&&a.setDate(n),y(t,{isAnim:!0,isOutputToInputObject:!0},a.getFullYear(),a.getMonth()-1,a.getDate(),a.getHours(),a.getMinutes()))}},c=function(e){var t=o(e),a=v(t),n=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();n<a.getDate()&&a.setDate(n),u(a.getFullYear(),a.getMonth()+1)<a.getDate()&&a.setDate(u(a.getFullYear(),a.getMonth()+1)),y(t,{isAnim:!0,isOutputToInputObject:!0},a.getFullYear(),a.getMonth()+1,a.getDate(),a.getHours(),a.getMinutes())},u=function(e,t){return new Date(e,t+1,0).getDate()},h=function(e,t,a){return"default"==e&&(e=Y(t,"format"),a&&(e=e.substring(0,e.search(" ")))),e},m=function(e){if(e<99){var t=new Date;return parseInt(e)+parseInt(t.getFullYear().toString().substr(0,2)+"00")}return e},p=function(e,t){var a,n,i;if(null!=t){var r=t.replace(/(-|\/)/g,"[-/]").replace(/YYYY/gi,"(\\d{2,4})").replace(/(YY|MM|DD|hh|mm)/g,"(\\d{1,2})").replace(/(M|D|h|m)/g,"(\\d{1,2})");if(a=new RegExp(r),null!=(n=a.exec(e))){for(var o=[],l="",d="",s=t;null!=s&&0<s.length;){var c=s.substring(0,1);s=s.substring(1,s.length),d!=c&&(/(YYYY|YY|MM|DD|mm|dd|M|D|h|m)/.test(l)?(o.push(l),l=""):l=""),l+=c,d=c}""!==l&&/(YYYY|YY|MM|DD|mm|dd|M|D|h|m)/.test(l)&&o.push(l);for(var u,h,p,g,f,v=!1,D=0;D<o.length&&!(n.length<D);D++){var M=o[D],Y=n[D+1];"YYYY"==M?(u=m(Y),v=!0):"YY"==M?(u=parseInt(Y)+2e3,v=!0):"MM"==M||"M"==M?(h=parseInt(Y)-1,v=!0):"DD"==M||"D"==M?(p=Y,v=!0):"hh"==M||"h"==M?(g=Y,v=!0):"mm"!=M&&"m"!=M||(f=Y,v=!0)}if(i=new Date(u,h,p,g,f),!0===v&&!1===isNaN(i)&&!1===isNaN(i.getDate()))return i}}return a=/^(\d{2,4})[-\/](\d{1,2})[-\/](\d{1,2}) (\d{1,2}):(\d{1,2})$/,n=a.exec(e),null!==n?(n[1]=m(n[1]),i=new Date(n[1],n[2]-1,n[3],n[4],n[5])):null!==(n=(a=/^(\d{2,4})[-\/](\d{1,2})[-\/](\d{1,2})$/).exec(e))&&(n[1]=m(n[1]),i=new Date(n[1],n[2]-1,n[3])),!1===isNaN(i)&&!1===isNaN(i.getDate())&&i},g=function(e,t){null==e&&(e=new Date);var a=e.getFullYear(),n=e.getMonth()+1,i=e.getDate(),r=e.getHours(),o=e.getMinutes();return t=t.replace(/YYYY/gi,a).replace(/YY/g,a-2e3).replace(/MM/g,D(n)).replace(/M/g,n).replace(/DD/g,D(i)).replace(/D/g,i).replace(/hh/g,D(r)).replace(/h/g,r).replace(/mm/g,D(o)).replace(/m/g,o)},f=function(e){var t=l(e);if(null!=t){var a=v(e),n=e.data("locale"),i=h(e.data("dateFormat"),n,e.data("dateOnly")),r=t.val();t.val(g(a,i)),r!=t.val()&&t.trigger("change")}},v=function(e){return o(e).data("pickedDate")},D=function(e){return e=("0"+e).slice(-2)},M=function(e,t,a){y(e,t,a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes())},Y=function(e,a){return void 0!==t[e][a]?t[e][a]:t.en[a]},y=function(a,n,i,l,u,h,m){var p=new Date;p=null!=h?new Date(i,l,u,h,m,0):null!=i?new Date(i,l,u):new Date;var g=a.data("todayButton"),M=n.isAnim;!1===a.data("timelistScroll")&&(M=!1);var b=n.isAnim;!1===a.data("animation")&&(b=!1);var O=a.data("futureOnly"),k=a.data("minDate"),T=a.data("maxDate"),I=n.isOutputToInputObject,S=a.data("minuteInterval"),x=a.data("firstDayOfWeek"),j=a.data("allowWdays");(null==j||!1===w("Array",j)||j.length<=0)&&(j=null);var F=a.data("minTime"),C=a.data("maxTime"),A=new Date;if(O&&p.getTime()<A.getTime()&&p.setTime(A.getTime()),null!=j&&j.length<=6)for(;;){if(-1!=e.inArray(p.getDay(),j))break;p.setDate(p.getDate()+1)}var _=a.data("locale");t.hasOwnProperty(_)||(_="en");var H=new Date(p.getFullYear(),p.getMonth(),1).getDay()-x,N=new Date(p.getFullYear(),p.getMonth()+1,0).getDate(),z=new Date(p.getFullYear(),p.getMonth(),0).getDate(),J=new Date(p.getFullYear(),p.getMonth(),0),$=new Date(p.getFullYear(),p.getMonth()+2,0),L=A.getFullYear()==p.getFullYear(),P=L&&A.getMonth()==p.getMonth(),W=P&&A.getDate()==p.getDate(),B=!1;(p.getFullYear()<A.getFullYear()||L&&p.getMonth()<A.getMonth())&&(B=!0);var V=a.children(".datepicker_header"),E=(a.children(".datepicker_inner_container"),a.children(".datepicker_inner_container").children(".datepicker_calendar")),q=E.children(".datepicker_table"),G=a.children(".datepicker_inner_container").children(".datepicker_timelist"),K="",Q=v(a);null!=Q&&(Q.getMonth()!=p.getMonth()||Q.getDate()!=p.getDate()?K="calendar":Q.getHours()==p.getHours()&&Q.getMinutes()==p.getMinutes()||0!==p.getMinutes()&&p.getMinutes()%S!=0||(K="timelist")),e(a).data("pickedDate",p),!0===b&&("calendar"==K?(E.stop().queue([]),E.fadeTo("fast",.8)):"timelist"==K&&(G.stop().queue([]),G.fadeTo("fast",.8)));var R=G.scrollTop(),U=-1;V.children().remove();var Z=new Date(p.getTime());Z.setMinutes(59),Z.setHours(23),Z.setSeconds(59),Z.setDate(0);var X=null;O&&P||!(null==k||k<Z.getTime())?a.data("stateAllowBeforeMonth",!1):((X=e("<a>")).text("<"),X.prop("alt",Y(_,"prevMonth")),X.prop("title",Y(_,"prevMonth")),X.click(function(){s(a)}),a.data("stateAllowBeforeMonth",!0)),Z.setMinutes(0),Z.setHours(0),Z.setSeconds(0),Z.setDate(1),Z.setMonth(p.getMonth()+1);var ee=e("<span>");ee.text(p.getFullYear()+" "+Y(_,"sep")+" "+Y(_,"months")[p.getMonth()]);var te=null;if((null==T||T>Z.getTime())&&((te=e("<a>")).text(">"),te.prop("alt",Y(_,"nextMonth")),te.prop("title",Y(_,"nextMonth")),te.click(function(){c(a)})),g){var ae=e("<a/>");ae.html(decodeURIComponent("%3c%3fxml%20version%3d%221%2e0%22%20encoding%3d%22UTF%2d8%22%20standalone%3d%22no%22%3f%3e%3csvg%20%20xmlns%3adc%3d%22http%3a%2f%2fpurl%2eorg%2fdc%2felements%2f1%2e1%2f%22%20%20xmlns%3acc%3d%22http%3a%2f%2fcreativecommons%2eorg%2fns%23%22%20xmlns%3ardf%3d%22http%3a%2f%2fwww%2ew3%2eorg%2f1999%2f02%2f22%2drdf%2dsyntax%2dns%23%22%20%20xmlns%3asvg%3d%22http%3a%2f%2fwww%2ew3%2eorg%2f2000%2fsvg%22%20xmlns%3d%22http%3a%2f%2fwww%2ew3%2eorg%2f2000%2fsvg%22%20%20version%3d%221%2e1%22%20%20width%3d%22100%25%22%20%20height%3d%22100%25%22%20viewBox%3d%220%200%2010%2010%22%3e%3cg%20transform%3d%22translate%28%2d5%2e5772299%2c%2d26%2e54581%29%22%3e%3cpath%20d%3d%22m%2014%2e149807%2c31%2e130932%20c%200%2c%2d0%2e01241%200%2c%2d0%2e02481%20%2d0%2e0062%2c%2d0%2e03721%20L%2010%2e57723%2c28%2e153784%207%2e0108528%2c31%2e093719%20c%200%2c0%2e01241%20%2d0%2e0062%2c0%2e02481%20%2d0%2e0062%2c0%2e03721%20l%200%2c2%2e97715%20c%200%2c0%2e217084%200%2e1798696%2c0%2e396953%200%2e3969534%2c0%2e396953%20l%202%2e3817196%2c0%200%2c%2d2%2e38172%201%2e5878132%2c0%200%2c2%2e38172%202%2e381719%2c0%20c%200%2e217084%2c0%200%2e396953%2c%2d0%2e179869%200%2e396953%2c%2d0%2e396953%20l%200%2c%2d2%2e97715%20m%201%2e383134%2c%2d0%2e427964%20c%200%2e06823%2c%2d0%2e08063%200%2e05582%2c%2d0%2e210882%20%2d0%2e02481%2c%2d0%2e279108%20l%20%2d1%2e358324%2c%2d1%2e128837%200%2c%2d2%2e530576%20c%200%2c%2d0%2e111643%20%2d0%2e08683%2c%2d0%2e198477%20%2d0%2e198477%2c%2d0%2e198477%20l%20%2d1%2e190859%2c0%20c%20%2d0%2e111643%2c0%20%2d0%2e198477%2c0%2e08683%20%2d0%2e198477%2c0%2e198477%20l%200%2c1%2e209467%20%2d1%2e513384%2c%2d1%2e265289%20c%20%2d0%2e2605%2c%2d0%2e217083%20%2d0%2e682264%2c%2d0%2e217083%20%2d0%2e942764%2c0%20L%205%2e6463253%2c30%2e42386%20c%20%2d0%2e080631%2c0%2e06823%20%2d0%2e093036%2c0%2e198476%20%2d0%2e024809%2c0%2e279108%20l%200%2e3845485%2c0%2e458976%20c%200%2e031012%2c0%2e03721%200%2e080631%2c0%2e06203%200%2e1302503%2c0%2e06823%200%2e055821%2c0%2e0062%200%2e1054407%2c%2d0%2e01241%200%2e1488574%2c%2d0%2e04342%20l%204%2e2920565%2c%2d3%2e578782%204%2e292058%2c3%2e578782%20c%200%2e03721%2c0%2e03101%200%2e08063%2c0%2e04342%200%2e13025%2c0%2e04342%200%2e0062%2c0%200%2e01241%2c0%200%2e01861%2c0%200%2e04962%2c%2d0%2e0062%200%2e09924%2c%2d0%2e03101%200%2e130251%2c%2d0%2e06823%20l%200%2e384549%2c%2d0%2e458976%22%20%2f%3e%3c%2fg%3e%3c%2fsvg%3e")),ae.addClass("icon-home"),ae.prop("alt",Y(_,"today")),ae.prop("title",Y(_,"today")),ae.click(function(){d(a)}),V.append(ae)}null!=X&&V.append(X),V.append(ee),null!=te&&V.append(te),q.children().remove();var ne=e("<tr>");q.append(ne);for(var ie,re=7+x,oe=Y(_,"days"),le=0;le<7;le++)(ie=e("<th>")).text(oe[(le+re)%7]),ne.append(ie);var de=7*Math.ceil((H+N)/7);le=0,H<0&&(le=-7);var se=new Date(p.getTime());se.setHours(0),se.setMinutes(0),se.setSeconds(0);for(;le<de;le++){var ce=le+1-H,ue=B||P&&ce<A.getDate();le%7==0&&(ne=e("<tr>"),q.append(ne)),(ie=e("<td>")).data("day",ce),ne.append(ie),H>le?(ie.text(z+ce),ie.addClass("day_another_month"),ie.data("dateStr",J.getFullYear()+"/"+(J.getMonth()+1)+"/"+(z+ce)),se.setDate(z+ce),se.setMonth(J.getMonth()),se.setYear(J.getFullYear())):le<H+N?(ie.text(ce),ie.data("dateStr",p.getFullYear()+"/"+(p.getMonth()+1)+"/"+ce),se.setDate(ce),se.setMonth(p.getMonth()),se.setYear(p.getFullYear())):(ie.text(ce-N),ie.addClass("day_another_month"),ie.data("dateStr",$.getFullYear()+"/"+($.getMonth()+1)+"/"+(ce-N)),se.setDate(ce-N),se.setMonth($.getMonth()),se.setYear($.getFullYear()));var he=(le+re)%7;if(null!=j){if(-1==e.inArray(he,j)){ie.addClass("day_in_unallowed");continue}}else 0===he?ie.addClass("wday_sun"):6==he&&ie.addClass("wday_sat");ce==p.getDate()&&ie.addClass("active"),P&&ce==A.getDate()&&ie.addClass("today");var me=new Date(se.getTime());me.setHours(23),me.setMinutes(59),me.setSeconds(59),null!=k&&k>me.getTime()||null!=T&&T<se.getTime()?ie.addClass("out_of_range"):O&&ue?ie.addClass("day_in_past"):(ie.click(function(){e(this).hasClass("hover")&&e(this).removeClass("hover"),e(this).addClass("active");var t=o(e(this)),a=new Date(e(this).data("dateStr")),n=v(t);y(t,{isAnim:!1,isOutputToInputObject:!0},a.getFullYear(),a.getMonth(),a.getDate(),n.getHours(),n.getMinutes()),!0===t.data("dateOnly")&&!1===t.data("isInline")&&t.data("closeOnSelected")&&(r=-1,t.hide())}),ie.hover(function(){e(this).hasClass("active")||e(this).addClass("hover")},function(){e(this).hasClass("hover")&&e(this).removeClass("hover")}))}if(!0===a.data("dateOnly"))G.css("display","none");else{G.children().remove(),E.innerHeight()>0&&G.css("height",E.innerHeight()-10+"px"),se=new Date(p.getTime()),G.css("height",E.innerHeight()-10+"px");for(var pe=F[0],ge=F[1];100*pe+ge<100*C[0]+C[1];){var fe=e("<div>"),ve=pe<A.getHours()||pe==A.getHours()&&ge<A.getMinutes(),De=W&&ve;fe.addClass("timelist_item"),fe.text(D(pe)+":"+D(ge)),fe.data("hour",pe),fe.data("min",ge),G.append(fe),se.setHours(pe),se.setMinutes(ge),null!=k&&k>se.getTime()||null!=T&&T<se.getTime()?fe.addClass("out_of_range"):O&&De?fe.addClass("time_in_past"):(fe.click(function(){e(this).hasClass("hover")&&e(this).removeClass("hover"),e(this).addClass("active");var t=o(e(this)),a=v(t),n=e(this).data("hour"),i=e(this).data("min");y(t,{isAnim:!1,isOutputToInputObject:!0},a.getFullYear(),a.getMonth(),a.getDate(),n,i),!1===t.data("isInline")&&t.data("closeOnSelected")&&(r=-1,t.hide())}),fe.hover(function(){e(this).hasClass("active")||e(this).addClass("hover")},function(){e(this).hasClass("hover")&&e(this).removeClass("hover")})),pe==p.getHours()&&ge==p.getMinutes()&&(fe.addClass("active"),U=fe.offset().top),(ge+=S)>=60&&(ge-=60,pe++)}!0===M?G.scrollTop(U-G.offset().top):G.scrollTop(R)}!0===b&&("calendar"==K?E.fadeTo("fast",1):"timelist"==K&&G.fadeTo("fast",1)),!0===I&&f(a)},w=function(e,t){var a=Object.prototype.toString.call(t).slice(8,-1);return void 0!==t&&null!==t&&a===e},b=function(t,a){var i=e("<div>");if(i.destroy=function(){window.alert("destroy!")},i.addClass("datepicker"),t.append(i),a.current){var l=h(a.dateFormat,a.locale,a.dateOnly),d=p(a.current,l);a.current=d||new Date}else a.current=new Date;null!=a.inputObjectId&&i.data("inputObjectId",a.inputObjectId),i.data("dateOnly",a.dateOnly),i.data("pickerId",n.length),i.data("dateFormat",a.dateFormat),i.data("locale",a.locale),i.data("firstDayOfWeek",a.firstDayOfWeek),i.data("animation",a.animation),i.data("closeOnSelected",a.closeOnSelected),i.data("timelistScroll",a.timelistScroll),i.data("calendarMouseScroll",a.calendarMouseScroll),i.data("todayButton",a.todayButton),i.data("futureOnly",a.futureOnly),i.data("onShow",a.onShow),i.data("onHide",a.onHide),i.data("onInit",a.onInit),i.data("allowWdays",a.allowWdays);var u=Date.parse(a.minDate);isNaN(u)?i.data("minDate",null):i.data("minDate",u);var m=Date.parse(a.maxDate);isNaN(m)?i.data("maxDate",null):i.data("maxDate",m),i.data("state",0),5<=a.minuteInterval&&a.minuteInterval<=30?i.data("minuteInterval",a.minuteInterval):i.data("minuteInterval",30),a.minTime=a.minTime.split(":"),a.maxTime=a.maxTime.split(":"),a.minTime[0]>=0&&a.minTime[0]<24||(a.minTime[0]="00"),a.maxTime[0]>=0&&a.maxTime[0]<24||(a.maxTime[0]="23"),a.minTime[1]>=0&&a.minTime[1]<60||(a.minTime[1]="00"),a.maxTime[1]>=0&&a.maxTime[1]<24||(a.maxTime[1]="59"),a.minTime[0]=parseInt(a.minTime[0]),a.minTime[1]=parseInt(a.minTime[1]),a.maxTime[0]=parseInt(a.maxTime[0]),a.maxTime[1]=parseInt(a.maxTime[1]),i.data("minTime",a.minTime),i.data("maxTime",a.maxTime);var g=e("<div>");g.addClass("datepicker_header"),i.append(g);var f=e("<div>");f.addClass("datepicker_inner_container"),i.append(f);var v=e("<div>");v.addClass("datepicker_calendar");var D=e("<table>");D.addClass("datepicker_table"),v.append(D),f.append(v);var Y=e("<div>");Y.addClass("datepicker_timelist"),f.append(Y),i.hover(function(){r=e(this).data("pickerId")},function(){r=-1}),a.calendarMouseScroll&&(window.sidebar?v.bind("DOMMouseScroll",function(t){var a=o(e(this));return t.originalEvent.detail>0?c(a):s(a),!1}):v.bind("mousewheel",function(t){var a=o(e(this));return t.originalEvent.wheelDelta/120>0?s(a):c(a),!1})),n.push(i),M(i,{isAnim:!0,isOutputToInputObject:a.autodateOnStart},a.current)};e.fn.dtpicker=function(t){new Date;var a={current:null,dateFormat:"default",locale:"en",animation:!0,minuteInterval:30,firstDayOfWeek:0,closeOnSelected:!1,timelistScroll:!0,calendarMouseScroll:!0,todayButton:!0,dateOnly:!1,futureOnly:!1,minDate:null,maxDate:null,autodateOnStart:!0,minTime:"00:00",maxTime:"23:59",onShow:null,onHide:null,allowWdays:null};a.inputObjectId=void 0;var n=e.extend(a,t);return this.each(function(t){b(e(this),n)})},e.fn.appendDtpicker=function(t){new Date;var r={current:null,dateFormat:"default",locale:"en",animation:!0,minuteInterval:30,firstDayOfWeek:0,closeOnSelected:!1,timelistScroll:!0,calendarMouseScroll:!0,todayButton:!0,dateOnly:!1,futureOnly:!1,minDate:null,maxDate:null,autodateOnStart:!0,minTime:"00:00",maxTime:"23:59",onShow:null,onHide:null,allowWdays:null};r.inline=!1;var o=e.extend(r,t);return this.each(function(t){var r=this;if(0<e(n[e(r).data("pickerId")]).length)console.log("dtpicker - Already exist appended picker");else{var l=i.length;i.push(r),o.inputObjectId=l;null!=e(r).val()&&""!==e(r).val()&&(o.current=e(r).val());var d=e("<div>");o.inline?d.insertAfter(r):(d.css("position","absolute"),e("body").append(d));var s=n.length,c=e(d).dtpicker(o),u=c.children(".datepicker");e(r).data("pickerId",s),e(r).keyup(function(){var t=e(this),a=e(n[t.data("pickerId")]);if(null!=t.val()&&(null==t.data("beforeVal")||null!=t.data("beforeVal")&&t.data("beforeVal")!=t.val())){var i=h(a.data("dateFormat"),a.data("locale"),a.data("dateOnly")),r=p(t.val(),i);r&&M(a,{isAnim:!0,isOutputToInputObject:!1},r)}t.data("beforeVal",t.val())}),e(r).change(function(){e(this).trigger("keyup")});var m=new a(u,e(r));!0===o.inline?u.data("isInline",!0):(u.data("isInline",!1),c.css({zIndex:100}),u.css("width","auto"),u.hide(),e(r).on("click, focus",function(){var t=e(this),i=e(n[t.data("pickerId")]),r=new a(i,t);if(!r.isShow()){r.show();var o=i.data("onShow");null!=o&&(console.log("dtpicker- Call the onShow handler"),o(r))}}),function(t){e(window).resize(function(){t._relocate()}),e(window).scroll(function(){t._relocate()})}(m)),e(r).bind("destroyed",function(){var t=e(this),i=e(n[t.data("pickerId")]);new a(i,t).destroy()});var g=u.data("onInit");null!=g&&(console.log("dtpicker- Call the onInit handler"),g(m))}})};var O={show:function(){var t=e(this),i=e(n[t.data("pickerId")]);null!=i&&new a(i,t).show()},hide:function(){var t=e(this),i=e(n[t.data("pickerId")]);null!=i&&new a(i,t).hide()},setDate:function(t){var i=e(this),r=e(n[i.data("pickerId")]);null!=r&&new a(r,i).setDate(t)},getDate:function(){var t=e(this),i=e(n[t.data("pickerId")]);if(null!=i)return new a(i,t).getDate()},destroy:function(){var t=e(this),i=e(n[t.data("pickerId")]);null!=i&&new a(i,t).destroy()}};e.fn.handleDtpicker=function(t){return O[t]?O[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist on jQuery.handleDtpicker"):O.init.apply(this,arguments)},window.console||(window.console={},window.console.log=function(){}),e.event.special.destroyed={remove:function(e){e.handler&&e.handler.apply(this,arguments)}},e(function(){e("body").click(function(){for(var t=0;t<n.length;t++){var o=e(n[t]);if(r!=t&&null!=o.data("inputObjectId")&&!1===o.data("isInline")&&"none"!=o.css("display")){var l=i[o.data("inputObjectId")],d=new a(o,l);d.hide();var s=o.data("onHide");null!=s&&(console.log("dtpicker- Call the onHide handler"),s(d))}}})})}(jQuery);