Socket
Socket
Sign inDemoInstall

zebra_datepicker

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zebra_datepicker - npm Package Compare versions

Comparing version 1.9.10 to 1.9.11

examples/favicon.ico

8

CHANGELOG.md

@@ -0,1 +1,9 @@

## version 1.9.11 (August 10, 2018)
- fixed [#112](https://github.com/stefangabos/Zebra_Datepicker/issues/112) - thanks [@AnthonyHache](https://github.com/AnthonyHache)!
- fixed [#122](https://github.com/stefangabos/Zebra_Datepicker/issues/122) and now `start_date` and `set_date` methods accepts their argument also as a JavaScript `Date` object; thanks [alexanderKikhaev](https://github.com/alexanderKikhaev)!
- fixed positioning of `AM/PM` when using 12-hour time format
- CSS is now minified even more by using [clean-css](https://github.com/jakubpawlowicz/clean-css)
- updated examples page
## version 1.9.9 (July 06, 2018)

@@ -2,0 +10,0 @@

2

dist/zebra_datepicker.min.js

@@ -1,1 +0,1 @@

!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e){"use strict";e.Zebra_DatePicker=function(t,s){this.version="1.9.10";var i,n,a,r,o,d,c,l,g,_,h,p,u,f,m,b,y,v,w,k,D,A,M,P,C,F,Z,S,Y,x,I,z,N,j,H,O,T,L,R,W,B,E,Q,J={always_visible:!1,container:e("body"),custom_classes:!1,days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],days_abbr:!1,default_position:"above",direction:0,disable_time_picker:!1,disabled_dates:!1,enabled_dates:!1,enabled_hours:!1,enabled_minutes:!1,enabled_seconds:!1,first_day_of_week:1,format:"Y-m-d",header_captions:{days:"F, Y",months:"Y",years:"Y1 - Y2"},icon_margin:!1,icon_position:"right",inside:!0,lang_clear_date:"Clear date",months:["January","February","March","April","May","June","July","August","September","October","November","December"],months_abbr:!1,navigation:["&#9664;","&#9654;","&#9650;","&#9660;"],offset:[5,-5],open_icon_only:!1,open_on_focus:!1,pair:!1,readonly_element:!0,select_other_months:!1,show_clear_date:0,show_icon:!0,show_other_months:!0,show_select_today:"Today",show_week_number:!1,start_date:!1,strict:!1,view:"days",weekend_days:[0,6],zero_pad:!1,onChange:null,onClear:null,onOpen:null,onClose:null,onSelect:null},G={},U=[],V=[],$={},q=!1,X="",K=!1,ee=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform),te=this,se=e(t);te.settings={};var ie=function(t){var _,C,j,B,ie={days:["d","j","D"],months:["F","m","M","n","t"],years:["o","Y","y"],hours:["G","g","H","h"],minutes:["i"],seconds:["s"],ampm:["A","a"]},re=null;for(j=0;j<3;j++)X+=Math.floor(65536*(1+Math.random())).toString(16);if(!t){te.settings=e.extend({},J,e.fn.Zebra_DatePicker.defaults,s),$.readonly=se.attr("readonly"),$.style=se.attr("style"),$.padding_left=parseInt(se.css("paddingLeft"),10)||0,$.padding_right=parseInt(se.css("paddingRight"),10)||0;for(_ in se.data())0===_.indexOf("zdp_")&&(_=_.replace(/^zdp\_/,""),void 0!==J[_]&&(te.settings[_]="pair"===_?e(se.data("zdp_"+_)):se.data("zdp_"+_)))}te.settings.readonly_element?se.attr("readonly","readonly"):se.removeAttr("readonly"),R=!1,Q=[];for(re in ie)e.each(ie[re],function(t,s){var i,n;if(te.settings.format.indexOf(s)>-1)if("days"===re)Q.push("days");else if("months"===re)Q.push("months");else if("years"===re)Q.push("years");else if(("hours"===re||"minutes"===re||"seconds"===re||"ampm"===re)&&!te.settings.disable_time_picker)if(R||(R={is12hour:!1},Q.push("time")),"hours"===re)for("g"===s||"h"==s?(n=12,R.is12hour=!0):n=24,R.hours=[],i=12===n?1:0;i<(12===n?13:n);i++)(!e.isArray(te.settings.enabled_hours)||e.inArray(i,te.settings.enabled_hours)>-1)&&R.hours.push(i);else if("minutes"===re)for(R.minutes=[],i=0;i<60;i++)(!e.isArray(te.settings.enabled_minutes)||e.inArray(i,te.settings.enabled_minutes)>-1)&&R.minutes.push(i);else if("seconds"===re)for(R.seconds=[],i=0;i<60;i++)(!e.isArray(te.settings.enabled_seconds)||e.inArray(i,te.settings.enabled_seconds)>-1)&&R.seconds.push(i);else R.ampm=["am","pm"]});0===Q.length&&(Q=["years","months","days"]),-1===e.inArray(te.settings.view,Q)&&(te.settings.view=Q[Q.length-1]),c=[];for(j in te.settings.custom_classes)te.settings.custom_classes.hasOwnProperty(j)&&-1===c.indexOf(j)&&c.push(j);for(B=0;B<2+c.length;B++)C=0===B?te.settings.disabled_dates:1===B?te.settings.enabled_dates:te.settings.custom_classes[c[B-2]],e.isArray(C)&&C.length>0&&e.each(C,function(){var t,s,i,n,a=this.split(" ");for(t=0;t<4;t++){for(a[t]||(a[t]="*"),a[t]=a[t].indexOf(",")>-1?a[t].split(","):new Array(a[t]),s=0;s<a[t].length;s++)if(a[t][s].indexOf("-")>-1&&null!==(n=a[t][s].match(/^([0-9]+)\-([0-9]+)/))){for(i=we(n[1]);i<=we(n[2]);i++)-1===e.inArray(i,a[t])&&a[t].push(i+"");a[t].splice(s,1)}for(s=0;s<a[t].length;s++)a[t][s]=isNaN(we(a[t][s]))?a[t][s]:we(a[t][s])}0===B?U.push(a):1===B?V.push(a):(void 0===G[c[B-2]]&&(G[c[B-2]]=[]),G[c[B-2]].push(a))});var de,ce,le=new Date,ge=te.settings.reference_date?te.settings.reference_date:se.data("zdp_reference_date")&&void 0!==se.data("zdp_reference_date")?se.data("zdp_reference_date"):le;if(O=void 0,f=void 0,b=ge.getMonth(),o=le.getMonth(),y=ge.getFullYear(),d=le.getFullYear(),m=ge.getDate(),r=le.getDate(),!0===te.settings.direction)O=ge;else if(!1===te.settings.direction)A=(f=ge).getMonth(),M=f.getFullYear(),D=f.getDate();else if(!e.isArray(te.settings.direction)&&ue(te.settings.direction)&&we(te.settings.direction)>0||e.isArray(te.settings.direction)&&((de=ne(te.settings.direction[0]))||!0===te.settings.direction[0]||ue(te.settings.direction[0])&&te.settings.direction[0]>0)&&((ce=ne(te.settings.direction[1]))||!1===te.settings.direction[1]||ue(te.settings.direction[1])&&te.settings.direction[1]>=0))O=de||new Date(y,b,m+we(e.isArray(te.settings.direction)?!0===te.settings.direction[0]?0:te.settings.direction[0]:te.settings.direction)),b=O.getMonth(),y=O.getFullYear(),m=O.getDate(),ce&&+ce>=+O?f=ce:!ce&&!1!==te.settings.direction[1]&&e.isArray(te.settings.direction)&&(f=new Date(y,b,m+we(te.settings.direction[1]))),f&&(A=f.getMonth(),M=f.getFullYear(),D=f.getDate());else if(!e.isArray(te.settings.direction)&&ue(te.settings.direction)&&we(te.settings.direction)<0||e.isArray(te.settings.direction)&&(!1===te.settings.direction[0]||ue(te.settings.direction[0])&&te.settings.direction[0]<0)&&((de=ne(te.settings.direction[1]))||ue(te.settings.direction[1])&&te.settings.direction[1]>=0))f=new Date(y,b,m+we(e.isArray(te.settings.direction)?!1===te.settings.direction[0]?0:te.settings.direction[0]:te.settings.direction)),A=f.getMonth(),M=f.getFullYear(),D=f.getDate(),de&&+de<+f?O=de:!de&&e.isArray(te.settings.direction)&&(O=new Date(M,A,D-we(te.settings.direction[1]))),O&&(b=O.getMonth(),y=O.getFullYear(),m=O.getDate());else if(e.isArray(te.settings.disabled_dates)&&te.settings.disabled_dates.length>0)for(var _e in U)if("*"===U[_e][0]&&"*"===U[_e][1]&&"*"===U[_e][2]&&"*"===U[_e][3]){var he=[];if(e.each(V,function(){var e=this;"*"!==e[2][0]&&he.push(parseInt(e[2][0]+("*"===e[1][0]?"12":ve(e[1][0],2))+("*"===e[0][0]?"*"===e[1][0]?"31":new Date(e[2][0],e[1][0],0).getDate():ve(e[0][0],2)),10))}),he.sort(),he.length>0){var fe=(he[0]+"").match(/([0-9]{4})([0-9]{2})([0-9]{2})/);y=parseInt(fe[1],10),b=parseInt(fe[2],10)-1,m=parseInt(fe[3],10)}break}if(pe(y,b,m)){for(;pe(y);)O?(y++,b=0):(y--,b=11);for(;pe(y,b);)O?(b++,m=1):(b--,m=new Date(y,b+1,0).getDate()),b>11?(y++,b=0,m=1):b<0&&(y--,b=11,m=new Date(y,b+1,0).getDate());for(;pe(y,b,m);)O?m++:m--,le=new Date(y,b,m),y=le.getFullYear(),b=le.getMonth(),m=le.getDate();le=new Date(y,b,m),y=le.getFullYear(),b=le.getMonth(),m=le.getDate()}var ye=ne(se.val()||(te.settings.start_date?te.settings.start_date:""));if(ye&&te.settings.strict&&pe(ye.getFullYear(),ye.getMonth(),ye.getDate())&&se.val(""),t||void 0===O&&void 0===ye||ke(void 0!==ye?ye:O),!(te.settings.always_visible instanceof jQuery)){if(!t){if(te.settings.show_icon){"firefox"===Ae.name&&se.is('input[type="text"]')&&"inline"===se.css("display")&&se.css("display","inline-block");var De=parseInt(se.css("marginTop"),10)||0,Me=parseInt(se.css("marginRight"),10)||0,Pe=parseInt(se.css("marginBottom"),10)||0,Ce=parseInt(se.css("marginLeft"),10)||0,Fe=e('<span class="Zebra_DatePicker_Icon_Wrapper"></span>').css({display:se.css("display"),position:"static"===se.css("position")?"relative":se.css("position"),float:se.css("float"),top:se.css("top"),right:se.css("right"),bottom:se.css("bottom"),left:se.css("left"),marginTop:De<0?De:0,marginRight:Me<0?Me:0,marginBottom:Pe<0?Pe:0,marginLeft:Ce<0?Ce:0,paddingTop:De,paddingRight:Me,paddingBottom:Pe,paddingLeft:Ce});"block"===se.css("display")&&Fe.css("width",se.outerWidth(!0)),se.wrap(Fe).css({position:"relative",float:"none",top:"auto",right:"auto",bottom:"auto",left:"auto",marginTop:0,marginRight:0,marginBottom:0,marginLeft:0}),k=e('<button type="button" class="Zebra_DatePicker_Icon'+("disabled"===se.attr("disabled")?" Zebra_DatePicker_Icon_Disabled":"")+'">Pick a date</button>'),te.icon=k,n=te.settings.open_icon_only?k:k.add(se)}else n=se;n.on("click.Zebra_DatePicker_"+X+(te.settings.open_on_focus?" focus.Zebra_DatePicker_"+X:""),function(){l.hasClass("dp_hidden")&&!se.attr("disabled")&&(!K||te.settings.readonly_element?te.show():(clearTimeout(T),T=setTimeout(function(){te.show()},600)))}),n.on("keydown.Zebra_DatePicker_"+X,function(e){9!==e.keyCode||l.hasClass("dp_hidden")||te.hide()}),!te.settings.readonly_element&&te.settings.pair&&se.on("blur.Zebra_DatePicker_"+X,function(){var t;(t=ne(e(this).val()))&&!pe(t.getFullYear(),t.getMonth(),t.getDate())&&ke(t)}),void 0!==k&&k.insertAfter(se)}if(void 0!==k){k.attr("style","");var Ze=se.outerWidth(),Se=se.outerHeight(),Ye=k.outerWidth(),xe=k.outerHeight();k.css("top",(Se-xe)/2),te.settings.inside?"right"===te.settings.icon_position?(k.css("right",!1!==te.settings.icon_margin?te.settings.icon_margin:$.padding_right),se.css("paddingRight",2*(!1!==te.settings.icon_margin?te.settings.icon_margin:$.padding_right)+Ye)):(k.css("left",!1!==te.settings.icon_margin?te.settings.icon_margin:$.padding_left),se.css("paddingLeft",2*(!1!==te.settings.icon_margin?te.settings.icon_margin:$.padding_left)+Ye)):k.css("left",Ze+(!1!==te.settings.icon_margin?te.settings.icon_margin:$.padding_left)),k.removeClass("Zebra_DatePicker_Icon_Disabled"),"disabled"===se.attr("disabled")&&k.addClass("Zebra_DatePicker_Icon_Disabled")}}if(H=!1!==te.settings.show_select_today&&e.inArray("days",Q)>-1&&!pe(d,o,r)&&te.settings.show_select_today,t)return e(".dp_previous",l).html(te.settings.navigation[0]),e(".dp_next",l).html(te.settings.navigation[1]),e(".dp_time_controls_increase .dp_time_control",l).html(te.settings.navigation[2]),e(".dp_time_controls_decrease .dp_time_control",l).html(te.settings.navigation[3]),e(".dp_clear",l).html(te.settings.lang_clear_date),void e(".dp_today",l).html(te.settings.show_select_today);e(window).on("resize.Zebra_DatePicker_"+X+", orientationchange.Zebra_DatePicker_"+X,function(){te.hide()});var Ie='<div class="Zebra_DatePicker"><table class="dp_header dp_actions"><tr><td class="dp_previous">'+te.settings.navigation[0]+(ee?"&#xFE0E;":"")+'</td><td class="dp_caption"></td><td class="dp_next">'+te.settings.navigation[1]+(ee?"&#xFE0E;":"")+'</td></tr></table><table class="dp_daypicker'+(te.settings.show_week_number?" dp_week_numbers":"")+' dp_body"></table><table class="dp_monthpicker dp_body"></table><table class="dp_yearpicker dp_body"></table><table class="dp_timepicker dp_body"></table><table class="dp_footer dp_actions"><tr><td class="dp_today">'+H+'</td><td class="dp_clear">'+te.settings.lang_clear_date+'</td><td class="dp_view_toggler dp_icon">&nbsp;&nbsp;&nbsp;&nbsp;</td><td class="dp_confirm dp_icon"></td></tr></table></div>';l=e(Ie),w=e("table.dp_header",l),g=e("table.dp_daypicker",l),P=e("table.dp_monthpicker",l),W=e("table.dp_yearpicker",l),L=e("table.dp_timepicker",l),v=e("table.dp_footer",l),N=e("td.dp_today",v),i=e("td.dp_clear",v),x=e("td.dp_view_toggler",v),a=e("td.dp_confirm",v),te.settings.always_visible instanceof jQuery?se.attr("disabled")||(te.settings.always_visible.append(l),te.show()):te.settings.container.append(l),l.on("mouseover","td:not(.dp_disabled)",function(){e(this).addClass("dp_hover")}).on("mouseout","td:not(.dp_disabled)",function(){e(this).removeClass("dp_hover")}),ae(l),e(".dp_previous",w).on("click",function(){"months"===E?z--:"years"===E?z-=12:--I<0&&(I=11,z--),me()}),e(".dp_caption",w).on("click",function(){E="days"===E?e.inArray("months",Q)>-1?"months":e.inArray("years",Q)>-1?"years":"days":"months"===E?e.inArray("years",Q)>-1?"years":e.inArray("days",Q)>-1?"days":"months":e.inArray("days",Q)>-1?"days":e.inArray("months",Q)>-1?"months":"years",me()}),e(".dp_next",w).on("click",function(){"months"===E?z++:"years"===E?z+=12:12==++I&&(I=0,z++),me()}),g.on("click","td:not(.dp_disabled)",function(){var t;te.settings.select_other_months&&e(this).attr("class")&&null!==(t=e(this).attr("class").match(/date\_([0-9]{4})(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])/))?be(t[1],t[2]-1,t[3],"days",e(this)):be(z,I,we(e(this).html()),"days",e(this))}),P.on("click","td:not(.dp_disabled)",function(){var t=e(this).attr("class").match(/dp\_month\_([0-9]+)/);I=we(t[1]),-1===e.inArray("days",Q)?be(z,I,1,"months",e(this)):(E="days",te.settings.always_visible&&se.val(""),me())}),W.on("click","td:not(.dp_disabled)",function(){z=we(e(this).html()),-1===e.inArray("months",Q)?be(z,1,1,"years",e(this)):(E="months",te.settings.always_visible&&se.val(""),me())}),N.on("click",function(t){var s=new Date;t.preventDefault(),be(s.getFullYear(),s.getMonth(),s.getDate(),"days",e(".dp_current",g))}),i.on("click",function(t){t.preventDefault(),se.val(""),h=null,p=null,u=null,te.settings.always_visible?e("td.dp_selected",l).removeClass("dp_selected"):(I=null,z=null),se.focus(),te.hide(),te.settings.onClear&&"function"==typeof te.settings.onClear&&te.settings.onClear.call(se)}),x.on("click",function(){"time"!==E?(E="time",me()):e(".dp_caption",w).trigger("click")}),a.on("click",function(){if(e(".dp_time_controls_increase td",L).trigger("click"),e(".dp_time_controls_decrease td",L).trigger("click"),te.settings.onSelect&&"function"==typeof te.settings.onSelect){var t=new Date(z,I,h,R&&R.hours?F+(R.ampm&&("pm"===Y&&F<12||"am"===Y&&12===F)?12:0):0,R&&R.minutes?Z:0,R&&R.seconds?S:0);te.settings.onSelect.call(se,oe(t),z+"-"+ve(I+1,2)+"-"+ve(h,2)+(R?" "+ve(t.getHours(),2)+":"+ve(t.getMinutes(),2)+":"+ve(t.getSeconds(),2):""),t)}te.hide()}),l.on("click",".dp_time_controls_increase td, .dp_time_controls_decrease td",function(){var t,s=e(this).parent(".dp_time_controls_increase").length>0,i=e(this).attr("class").match(/dp\_time\_([^\s]+)/i),n=e(".dp_time_segments .dp_time_"+i[1]+("ampm"!==i[1]?"s":""),L),a=n.text().toLowerCase(),r=R[i[1]+("ampm"!==i[1]?"s":"")],o=e.inArray("ampm"!==i[1]?parseInt(a,10):a,r),d=-1===o?0:s?o+1>=r.length?0:o+1:o-1<0?r.length-1:o-1;"hour"===i[1]?F=r[d]:"minute"===i[1]?Z=r[d]:"second"===i[1]?S=r[d]:Y=r[d],!h&&te.settings.start_date&&(t=ne(te.settings.start_date))&&(h=t.getDate()),h||(h=m),n.text(ve(r[d],2).toUpperCase()),be(z,I,h)}),te.settings.always_visible instanceof jQuery||(e(document).on("touchmove.Zebra_DatePicker_"+X,function(){q=!0}),e(document).on("mousedown.Zebra_DatePicker_"+X+" touchend.Zebra_DatePicker_"+X,function(t){if("touchend"===t.type&&q)return K=!0,q=!1;q=!1,l.hasClass("dp_hidden")||(!te.settings.open_icon_only||!te.icon||e(t.target).get(0)===te.icon.get(0))&&(te.settings.open_icon_only||e(t.target).get(0)===se.get(0)||te.icon&&e(t.target).get(0)===te.icon.get(0))||0!==e(t.target).parents().filter(".Zebra_DatePicker").length||te.hide(!0)}),e(document).on("keyup.Zebra_DatePicker_"+X,function(e){l.hasClass("dp_hidden")||27!==e.which||te.hide()})),me()};te.clear_date=function(){e(i).trigger("click")},te.destroy=function(){void 0!==te.icon&&(te.icon.off("click.Zebra_DatePicker_"+X),te.icon.off("focus.Zebra_DatePicker_"+X),te.icon.off("keydown.Zebra_DatePicker_"+X),te.icon.remove()),l.off(),l.remove(),!te.settings.show_icon||te.settings.always_visible instanceof jQuery||se.unwrap(),se.off("blur.Zebra_DatePicker_"+X),se.off("click.Zebra_DatePicker_"+X),se.off("focus.Zebra_DatePicker_"+X),se.off("keydown.Zebra_DatePicker_"+X),se.off("mousedown.Zebra_DatePicker_"+X),e(document).off("keyup.Zebra_DatePicker_"+X),e(document).off("mousedown.Zebra_DatePicker_"+X),e(document).off("touchend.Zebra_DatePicker_"+X),e(window).off("resize.Zebra_DatePicker_"+X),e(window).off("orientationchange.Zebra_DatePicker_"+X),se.removeData("Zebra_DatePicker"),se.attr("readonly",$.readonly),se.attr("style",$.style?$.style:""),se.css("paddingLeft",$.padding_left),se.css("paddingRight",$.padding_right)},te.hide=function(e){te.settings.always_visible&&!e||(he("hide"),l.addClass("dp_hidden"),te.settings.onClose&&"function"==typeof te.settings.onClose&&te.settings.onClose.call(se))},te.set_date=function(e){var t;(t=ne(e))&&!pe(t.getFullYear(),t.getMonth(),t.getDate())&&(se.val(e),ke(t))},te.show=function(){E=te.settings.view;var t,s=ne(se.val()||(te.settings.start_date?te.settings.start_date:""));if(s?(p=s.getMonth(),I=s.getMonth(),u=s.getFullYear(),z=s.getFullYear(),h=s.getDate(),pe(u,p,h)&&(te.settings.strict&&se.val(""),I=b,z=y)):(I=b,z=y),R&&(t=s||new Date,F=t.getHours(),Z=t.getMinutes(),S=t.getSeconds(),Y=F>=12?"pm":"am",R.is12hour&&(F=F%12==0?12:F%12),e.isArray(te.settings.enabled_hours)&&-1===e.inArray(F,te.settings.enabled_hours)&&(F=te.settings.enabled_hours[0]),e.isArray(te.settings.enabled_minutes)&&-1===e.inArray(Z,te.settings.enabled_minutes)&&(Z=te.settings.enabled_minutes[0]),e.isArray(te.settings.enabled_seconds)&&-1===e.inArray(S,te.settings.enabled_seconds)&&(S=te.settings.enabled_seconds[0])),me(),te.settings.always_visible instanceof jQuery)l.removeClass("dp_hidden");else{if(te.settings.container.is("body")){var i=l.outerWidth(),n=l.outerHeight(),a=(void 0!==k?k.offset().left+k.outerWidth(!0):se.offset().left+se.outerWidth(!0))+te.settings.offset[0],r=(void 0!==k?k.offset().top:se.offset().top)-n+te.settings.offset[1],o=e(window).width(),d=e(window).height(),c=e(window).scrollTop(),g=e(window).scrollLeft();"below"===te.settings.default_position&&(r=(void 0!==k?k.offset().top:se.offset().top)+te.settings.offset[1]),a+i>g+o&&(a=g+o-i),a<g&&(a=g),r+n>c+d&&(r=c+d-n),r<c&&(r=c),l.css({left:a,top:r})}else l.css({left:0,top:0});l.removeClass("dp_hidden"),he()}te.settings.onOpen&&"function"==typeof te.settings.onOpen&&te.settings.onOpen.call(se)},te.update=function(t){te.original_direction&&(te.original_direction=te.direction),te.settings=e.extend(te.settings,t),ie(!0)};var ne=function(t){if(t+="",""!==e.trim(t)){for(var s=re(te.settings.format),i=["d","D","j","l","N","S","w","F","m","M","n","Y","y","G","g","H","h","i","s","a","A"],n=[],a=[],r=null,o=null,d=0;d<i.length;d++)(r=s.indexOf(i[d]))>-1&&n.push({character:i[d],position:r});if(n.sort(function(e,t){return e.position-t.position}),e.each(n,function(e,t){switch(t.character){case"d":a.push("0[1-9]|[12][0-9]|3[01]");break;case"D":a.push("[a-z]{3}");break;case"j":a.push("[1-9]|[12][0-9]|3[01]");break;case"l":a.push("[a-zÀ-ɏ]+");break;case"N":a.push("[1-7]");break;case"S":a.push("st|nd|rd|th");break;case"w":a.push("[0-6]");break;case"F":a.push("[a-z]+");break;case"m":a.push("0[1-9]|1[012]");break;case"M":a.push("[a-z]{3}");break;case"n":a.push("[1-9]|1[012]");break;case"Y":a.push("[0-9]{4}");break;case"y":a.push("[0-9]{2}");break;case"G":a.push("[1-9]|1[0-9]|2[0123]");break;case"g":a.push("[0-9]|1[012]");break;case"H":a.push("0[0-9]|1[0-9]|2[0123]");break;case"h":a.push("0[0-9]|1[012]");break;case"i":case"s":a.push("0[0-9]|[12345][0-9]");break;case"a":a.push("am|pm");break;case"A":a.push("AM|PM")}}),a.length&&(n.reverse(),e.each(n,function(e,t){s=s.replace(t.character,"("+a[a.length-e-1]+")")}),a=new RegExp("^"+s+"$","ig"),o=a.exec(t))){var c,l,g=new Date,_=1,h=g.getMonth()+1,p=g.getFullYear(),u=g.getHours(),f=g.getMinutes(),m=g.getSeconds(),b=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],y=["January","February","March","April","May","June","July","August","September","October","November","December"],v=!0;if(n.reverse(),e.each(n,function(t,s){if(!v)return!0;switch(s.character){case"m":case"n":h=we(o[t+1]);break;case"d":case"j":_=we(o[t+1]);break;case"D":case"l":case"F":case"M":l="D"===s.character||"l"===s.character?te.settings.days:te.settings.months,v=!1,e.each(l,function(e,i){if(v)return!0;if(o[t+1].toLowerCase()===i.substring(0,"D"===s.character||"M"===s.character?3:i.length).toLowerCase()){switch(s.character){case"D":o[t+1]=b[e].substring(0,3);break;case"l":o[t+1]=b[e];break;case"F":o[t+1]=y[e],h=e+1;break;case"M":o[t+1]=y[e].substring(0,3),h=e+1}v=!0}});break;case"Y":p=we(o[t+1]);break;case"y":p="19"+we(o[t+1]);break;case"G":case"H":case"g":case"h":u=we(o[t+1]);break;case"i":f=we(o[t+1]);break;case"s":m=we(o[t+1]);break;case"a":case"A":c=o[t+1].toLowerCase()}}),v){var w=new Date(p,(h||1)-1,_||1,u+("pm"===c&&u<12||"am"===c&&12===u?12:0),f,m);if(w.getFullYear()===p&&w.getDate()===(_||1)&&w.getMonth()===(h||1)-1)return w}}return!1}},ae=function(t){"firefox"===Ae.name?t.css("MozUserSelect","none"):"explorer"===Ae.name?e(document).on("selectstart",t,function(){return!1}):t.mousedown(function(){return!1})},re=function(e){return e.replace(/([-.,*+?^${}()|[\]\/\\])/g,"\\$1")},oe=function(t){var s,i,n="",a=t.getDate(),r=t.getDay(),o=te.settings.days[r],d=t.getMonth()+1,c=te.settings.months[d-1],l=t.getFullYear()+"",g=t.getHours(),_=g%12==0?12:g%12,h=t.getMinutes(),p=t.getSeconds(),u=g>=12?"pm":"am";for(s=0;s<te.settings.format.length;s++)switch(i=te.settings.format.charAt(s)){case"y":l=l.substr(2);case"Y":n+=l;break;case"m":d=ve(d,2);case"n":n+=d;break;case"M":c=e.isArray(te.settings.months_abbr)&&void 0!==te.settings.months_abbr[d-1]?te.settings.months_abbr[d-1]:te.settings.months[d-1].substr(0,3);case"F":n+=c;break;case"d":a=ve(a,2);case"j":n+=a;break;case"D":o=e.isArray(te.settings.days_abbr)&&void 0!==te.settings.days_abbr[r]?te.settings.days_abbr[r]:te.settings.days[r].substr(0,3);case"l":n+=o;break;case"N":r++;case"w":n+=r;break;case"S":n+=a%10==1&&"11"!==a?"st":a%10==2&&"12"!==a?"nd":a%10==3&&"13"!==a?"rd":"th";break;case"g":n+=_;break;case"h":n+=ve(_,2);break;case"G":n+=g;break;case"H":n+=ve(g,2);break;case"i":n+=ve(h,2);break;case"s":n+=ve(p,2);break;case"a":n+=u;break;case"A":n+=u.toUpperCase();break;default:n+=i}return n},de=function(){var t,s,i,n,a,c,l,f,m,b,y,v=new Date(z,I+1,0).getDate(),w=new Date(z,I,1).getDay(),k=new Date(z,I,0).getDate(),D=w-te.settings.first_day_of_week;for(D=D<0?7+D:D,fe(te.settings.header_captions.days),s="<tr>",te.settings.show_week_number&&(s+="<th>"+te.settings.show_week_number+"</th>"),t=0;t<7;t++)s+="<th>"+(e.isArray(te.settings.days_abbr)&&void 0!==te.settings.days_abbr[(te.settings.first_day_of_week+t)%7]?te.settings.days_abbr[(te.settings.first_day_of_week+t)%7]:te.settings.days[(te.settings.first_day_of_week+t)%7].substr(0,2))+"</th>";for(s+="</tr><tr>",t=0;t<42;t++)t>0&&t%7==0&&(s+="</tr><tr>"),t%7==0&&te.settings.show_week_number&&(s+="<th>"+De(new Date(z,I,t-D+1))+"</th>"),i=t-D+1,te.settings.select_other_months&&(t<D||i>v)&&(a=(n=new Date(z,I,i)).getFullYear(),c=n.getMonth(),l=n.getDate(),n=a+ve(c+1,2)+ve(l,2)),f=(te.settings.first_day_of_week+t)%7,y=e.inArray(f,te.settings.weekend_days)>-1,t<D?s+='<td class="dp_not_in_month '+(y?"dp_weekend ":"")+(te.settings.select_other_months&&!pe(a,c,l)?"date_"+n:"dp_disabled")+'">'+(te.settings.select_other_months||te.settings.show_other_months?ve(k-D+t+1,te.settings.zero_pad?2:0):"&nbsp;")+"</td>":i>v?s+='<td class="dp_not_in_month '+(y?"dp_weekend ":"")+(te.settings.select_other_months&&!pe(a,c,l)?"date_"+n:"dp_disabled")+'">'+(te.settings.select_other_months||te.settings.show_other_months?ve(i-v,te.settings.zero_pad?2:0):"&nbsp;")+"</td>":(m="",b=_e(z,I,i),y&&(m=" dp_weekend"),I===o&&z===d&&r===i&&(m+=" dp_current"),""!==b&&(m+=" "+b),I===p&&z===u&&h===i&&(m+=" dp_selected"),pe(z,I,i)&&(m+=" dp_disabled"),s+="<td"+(""!==m?' class="'+e.trim(m)+'"':"")+">"+((te.settings.zero_pad?ve(i,2):i)||"&nbsp;")+"</td>");s+="</tr>",g.html(e(s)),te.settings.always_visible&&(_=e("td:not(.dp_disabled)",g)),g.show()},ce=function(){fe(te.settings.header_captions.months);var t,s,i="<tr>";for(t=0;t<12;t++)t>0&&t%3==0&&(i+="</tr><tr>"),s="dp_month_"+t,pe(z,t)?s+=" dp_disabled":!1!==p&&p===t&&z===u?s+=" dp_selected":o===t&&d===z&&(s+=" dp_current"),i+='<td class="'+e.trim(s)+'">'+(e.isArray(te.settings.months_abbr)&&void 0!==te.settings.months_abbr[t]?te.settings.months_abbr[t]:te.settings.months[t].substr(0,3))+"</td>";i+="</tr>",P.html(e(i)),te.settings.always_visible&&(C=e("td:not(.dp_disabled)",P)),P.show()},le=function(){var t;t='<tr class="dp_time_controls_increase">'+(R.hours?'<td class="dp_time_hour dp_time_control">'+te.settings.navigation[2]+"</td>":"")+(R.minutes?'<td class="dp_time_minute dp_time_control">'+te.settings.navigation[2]+"</td>":"")+(R.seconds?'<td class="dp_time_second dp_time_control">'+te.settings.navigation[2]+"</td>":"")+(R.ampm?'<td class="dp_time_ampm dp_time_control">'+te.settings.navigation[2]+"</td>":"")+"</tr>",t+='<tr class="dp_time_segments">',R.hours&&(t+='<td class="dp_time_hours dp_disabled'+(R.minutes||R.seconds||R.ampm?" dp_time_separator":"")+'"><div>'+ve(F,2)+"</div></td>"),R.minutes&&(t+='<td class="dp_time_minutes dp_disabled'+(R.seconds||R.ampm?" dp_time_separator":"")+'"><div>'+ve(Z,2)+"</div></td>"),R.seconds&&(t+='<td class="dp_time_seconds dp_disabled'+(R.ampm?" dp_time_separator":"")+'"><div>'+ve(S,2)+"</div></td>"),R.ampm&&(t+='<td class="dp_time_ampm dp_disabled">'+Y.toUpperCase()+"</td>"),t+="</tr>",t+='<tr class="dp_time_controls_decrease">'+(R.hours?'<td class="dp_time_hour dp_time_control">'+te.settings.navigation[3]+"</td>":"")+(R.minutes?'<td class="dp_time_minute dp_time_control">'+te.settings.navigation[3]+"</td>":"")+(R.seconds?'<td class="dp_time_second dp_time_control">'+te.settings.navigation[3]+"</td>":"")+(R.ampm?'<td class="dp_time_ampm dp_time_control">'+te.settings.navigation[3]+"</td>":"")+"</tr>",L.html(e(t)),L.show()},ge=function(){fe(te.settings.header_captions.years);var t,s,i="<tr>";for(t=0;t<12;t++)t>0&&t%3==0&&(i+="</tr><tr>"),s="",pe(z-7+t)?s+=" dp_disabled":u&&u===z-7+t?s+=" dp_selected":d===z-7+t&&(s+=" dp_current"),i+="<td"+(""!==e.trim(s)?' class="'+e.trim(s)+'"':"")+">"+(z-7+t)+"</td>";i+="</tr>",W.html(e(i)),te.settings.always_visible&&(B=e("td:not(.dp_disabled)",W)),W.show()},_e=function(t,s,i){var n,a,r;void 0!==s&&(s+=1);for(a in c)if(n=c[a],r=!1,e.isArray(G[n])&&e.each(G[n],function(){if(!r){var a,o=this;if((e.inArray(t,o[2])>-1||e.inArray("*",o[2])>-1)&&(void 0!==s&&e.inArray(s,o[1])>-1||e.inArray("*",o[1])>-1)&&(void 0!==i&&e.inArray(i,o[0])>-1||e.inArray("*",o[0])>-1)){if(e.inArray("*",o[3])>-1)return r=n;if(a=new Date(t,s-1,i).getDay(),e.inArray(a,o[3])>-1)return r=n}}}),r)return r;return r||""},he=function(t){var s,i;if("explorer"===Ae.name&&6===Ae.version)switch(j||(s=we(l.css("zIndex"))-1,j=e("<iframe>",{src:'javascript:document.write("")',scrolling:"no",frameborder:0,css:{zIndex:s,position:"absolute",top:-1e3,left:-1e3,width:l.outerWidth(),height:l.outerHeight(),filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)",display:"none"}}),e("body").append(j)),t){case"hide":j.hide();break;default:i=l.offset(),j.css({top:i.top,left:i.left,display:"block"})}},pe=function(t,s,i){var n,a,r,o;if(!(void 0!==t&&!isNaN(t)||void 0!==s&&!isNaN(s)||void 0!==i&&!isNaN(i)))return!1;if(t<1e3)return!0;if(e.isArray(te.settings.direction)||0!==we(te.settings.direction)){if(n=we(ye(t,void 0!==s?ve(s,2):"",void 0!==i?ve(i,2):"")),8===(a=(n+"").length)&&(void 0!==O&&n<we(ye(y,ve(b,2),ve(m,2)))||void 0!==f&&n>we(ye(M,ve(A,2),ve(D,2)))))return!0;if(6===a&&(void 0!==O&&n<we(ye(y,ve(b,2)))||void 0!==f&&n>we(ye(M,ve(A,2)))))return!0;if(4===a&&(void 0!==O&&n<y||void 0!==f&&n>M))return!0}return void 0!==s&&(s+=1),r=!1,o=!1,e.isArray(U)&&U.length&&e.each(U,function(){if(!r){var n,a=this;if((e.inArray(t,a[2])>-1||e.inArray("*",a[2])>-1)&&(void 0!==s&&e.inArray(s,a[1])>-1||e.inArray("*",a[1])>-1)&&(void 0!==i&&e.inArray(i,a[0])>-1||e.inArray("*",a[0])>-1)){if(e.inArray("*",a[3])>-1)return r=!0;if(n=new Date(t,s-1,i).getDay(),e.inArray(n,a[3])>-1)return r=!0}}}),V&&e.each(V,function(){if(!o){var n,a=this;if((e.inArray(t,a[2])>-1||e.inArray("*",a[2])>-1)&&(o=!0,void 0!==s))if(o=!0,e.inArray(s,a[1])>-1||e.inArray("*",a[1])>-1){if(void 0!==i)if(o=!0,e.inArray(i,a[0])>-1||e.inArray("*",a[0])>-1){if(e.inArray("*",a[3])>-1)return o=!0;if(n=new Date(t,s-1,i).getDay(),e.inArray(n,a[3])>-1)return o=!0;o=!1}else o=!1}else o=!1}}),(!V||!o)&&!(!U||!r)},ue=function(e){return(e+"").match(/^\-?[0-9]+$/)},fe=function(t){!isNaN(parseFloat(I))&&isFinite(I)&&(t=t.replace(/\bm\b|\bn\b|\bF\b|\bM\b/,function(t){switch(t){case"m":return ve(I+1,2);case"n":return I+1;case"F":return te.settings.months[I];case"M":return e.isArray(te.settings.months_abbr)&&void 0!==te.settings.months_abbr[I]?te.settings.months_abbr[I]:te.settings.months[I].substr(0,3);default:return t}})),!isNaN(parseFloat(z))&&isFinite(z)&&(t=t.replace(/\bY\b/,z).replace(/\by\b/,(z+"").substr(2)).replace(/\bY1\b/i,z-7).replace(/\bY2\b/i,z+4)),e(".dp_caption",w).html(t)},me=function(){var t,s;""===g.text()||"days"===E?(""===g.text()?(te.settings.always_visible instanceof jQuery||l.css("left",-1e3),l.removeClass("hidden"),de(),t=void 0!==g[0].getBoundingClientRect&&void 0!==g[0].getBoundingClientRect().height?g[0].getBoundingClientRect().height:g.outerHeight(!0),P.css("height",t),W.css("height",t),L.css("height",t+w.outerHeight(!0)),l.css("width",l.outerWidth()),l.addClass("dp_hidden")):de(),w.show(),P.hide(),W.hide(),L.hide(),x.hide(),a.hide(),R&&x.show().removeClass("dp_calendar")):"months"===E?(ce(),g.hide(),W.hide(),L.hide(),x.hide(),a.hide()):"years"===E?(ge(),g.hide(),P.hide(),L.hide(),x.hide(),a.hide()):"time"===E&&(le(),1===Q.length?(x.hide(),a.show()):(x.show().addClass("dp_calendar"),""===se.val()?a.hide():a.show()),w.hide(),g.hide(),P.hide(),W.hide()),"time"!==E&&te.settings.onChange&&"function"==typeof te.settings.onChange&&void 0!==E&&((s="days"===E?g.find("td:not(.dp_disabled)"):"months"===E?P.find("td:not(.dp_disabled)"):W.find("td:not(.dp_disabled)")).each(function(){var t;"days"===E?e(this).hasClass("dp_not_in_month")&&!e(this).hasClass("dp_disabled")?(t=e(this).attr("class").match(/date\_([0-9]{4})(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])/),e(this).data("date",t[1]+"-"+t[2]+"-"+t[3])):e(this).data("date",z+"-"+ve(I+1,2)+"-"+ve(we(e(this).text()),2)):"months"===E?(t=e(this).attr("class").match(/dp\_month\_([0-9]+)/),e(this).data("date",z+"-"+ve(we(t[1])+1,2))):e(this).data("date",we(e(this).text()))}),te.settings.onChange.call(se,E,s)),v.show(),"time"===E&&Q.length>1?(N.hide(),i.hide(),x.css("width",""===se.val()?"100%":"50%")):(N.show(),i.show(),!0===te.settings.show_clear_date||0===te.settings.show_clear_date&&""!==se.val()||te.settings.always_visible&&!1!==te.settings.show_clear_date?H?(N.css("width","50%"),i.css("width","50%")):(N.hide(),i.css("width",e.inArray(Q,"time")>-1?"50%":"100%")):(i.hide(),H?N.css("width","100%"):(N.hide(),(!R||"time"!==E&&"days"!==E)&&v.hide())))},be=function(e,t,s,i,n){var a=new Date(e,t,s,R&&R.hours?F+(R.ampm&&("pm"===Y&&F<12||"am"===Y&&12===F)?12:0):0,R&&R.minutes?Z:0,R&&R.seconds?S:0),r="days"===i?_:"months"===i?C:B,o=oe(a);se.val(o),(te.settings.always_visible||R)&&(p=a.getMonth(),I=a.getMonth(),u=a.getFullYear(),z=a.getFullYear(),h=a.getDate(),n&&r&&(r.removeClass("dp_selected"),n.addClass("dp_selected"),"days"===i&&n.hasClass("dp_not_in_month")&&!n.hasClass("dp_disabled")&&te.show())),R?(E="time",me()):(se.focus(),te.hide()),ke(a),!R&&te.settings.onSelect&&"function"==typeof te.settings.onSelect&&te.settings.onSelect.call(se,o,e+"-"+ve(t+1,2)+"-"+ve(s,2),a)},ye=function(){var e,t="";for(e=0;e<arguments.length;e++)t+=arguments[e]+"";return t},ve=function(e,t){for(e+="";e.length<t;)e="0"+e;return e},we=function(e){return parseInt(e,10)},ke=function(t){te.settings.pair&&e.each(te.settings.pair,function(){var s,i=e(this);i.data&&i.data("Zebra_DatePicker")?((s=i.data("Zebra_DatePicker")).update({reference_date:t,direction:0===s.settings.direction?1:s.settings.direction}),s.settings.always_visible&&s.show()):i.data("zdp_reference_date",t)})},De=function(e){var t,s,i,n,a,r,o,d=e.getFullYear(),c=e.getMonth()+1,l=e.getDate();return c<3?(i=(s=((t=d-1)/4|0)-(t/100|0)+(t/400|0))-(((t-1)/4|0)-((t-1)/100|0)+((t-1)/400|0)),n=0,a=l-1+31*(c-1)):(n=(i=(s=((t=d)/4|0)-(t/100|0)+(t/400|0))-(((t-1)/4|0)-((t-1)/100|0)+((t-1)/400|0)))+1,a=l+((153*(c-3)+2)/5|0)+58+i),r=(t+s)%7,l=(a+r-n)%7,o=a+3-l,o<0?53-((r-i)/5|0):o>364+i?1:1+(o/7|0)},Ae={init:function(){this.name=this.searchString(this.dataBrowser)||"",this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||""},searchString:function(e){var t,s,i;for(t=0;t<e.length;t++)if(s=e[t].string,i=e[t].prop,this.versionSearchString=e[t].versionSearch||e[t].identity,s){if(-1!==s.indexOf(e[t].subString))return e[t].identity}else if(i)return e[t].identity},searchVersion:function(e){var t=e.indexOf(this.versionSearchString);if(-1!==t)return parseFloat(e.substring(t+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"Firefox",identity:"firefox"},{string:navigator.userAgent,subString:"MSIE",identity:"explorer",versionSearch:"MSIE"}]};Ae.init(),ie()},e.fn.Zebra_DatePicker=function(t){return this.each(function(){void 0!==e(this).data("Zebra_DatePicker")&&e(this).data("Zebra_DatePicker").destroy();var s=new e.Zebra_DatePicker(this,t);e(this).data("Zebra_DatePicker",s)})},e.fn.Zebra_DatePicker.defaults={}});
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)}(function(Ie){"use strict";Ie.Zebra_DatePicker=function(e,M){var P,C,F,Z,S,Y,x,I,z,u,j,N,H,O,T,L,R,W,B,E,Q,J,G,U,d,V,$,q,X,K,ee,te,se,i,ie,ne,ae,re,oe,de,c,ce,le,ge={always_visible:!(this.version="1.9.11"),container:Ie("body"),custom_classes:!1,days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],days_abbr:!1,default_position:"above",direction:0,disable_time_picker:!1,disabled_dates:!1,enabled_dates:!1,enabled_hours:!1,enabled_minutes:!1,enabled_seconds:!1,first_day_of_week:1,format:"Y-m-d",header_captions:{days:"F, Y",months:"Y",years:"Y1 - Y2"},icon_margin:!1,icon_position:"right",inside:!0,lang_clear_date:"Clear date",months:["January","February","March","April","May","June","July","August","September","October","November","December"],months_abbr:!1,navigation:["&#9664;","&#9654;","&#9650;","&#9660;"],offset:[5,-5],open_icon_only:!1,open_on_focus:!1,pair:!1,readonly_element:!0,select_other_months:!1,show_clear_date:0,show_icon:!0,show_other_months:!0,show_select_today:"Today",show_week_number:!1,start_date:!1,strict:!1,view:"days",weekend_days:[0,6],zero_pad:!1,onChange:null,onClear:null,onOpen:null,onClose:null,onSelect:null},_e={},he=[],pe=[],ue={},fe=!1,me="",be=!1,ye=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform),ve=this,we=Ie(e);ve.settings={};var t=function(e){var t,s,i,a,n={days:["d","j","D"],months:["F","m","M","n","t"],years:["o","Y","y"],hours:["G","g","H","h"],minutes:["i"],seconds:["s"],ampm:["A","a"]},r=null;for(i=0;i<3;i++)me+=Math.floor(65536*(1+Math.random())).toString(16);if(!e)for(t in ve.settings=Ie.extend({},ge,Ie.fn.Zebra_DatePicker.defaults,M),ue.readonly=we.attr("readonly"),ue.style=we.attr("style"),ue.padding_left=parseInt(we.css("paddingLeft"),10)||0,ue.padding_right=parseInt(we.css("paddingRight"),10)||0,we.data())0===t.indexOf("zdp_")&&(t=t.replace(/^zdp\_/,""),void 0!==ge[t]&&(ve.settings[t]="pair"===t?Ie(we.data("zdp_"+t)):we.data("zdp_"+t)));for(r in ve.settings.readonly_element?we.attr("readonly","readonly"):we.removeAttr("readonly"),oe=!1,le=[],n)Ie.each(n[r],function(e,t){var s,i;if(-1<ve.settings.format.indexOf(t))if("days"===r)le.push("days");else if("months"===r)le.push("months");else if("years"===r)le.push("years");else if(("hours"===r||"minutes"===r||"seconds"===r||"ampm"===r)&&!ve.settings.disable_time_picker)if(oe||(oe={is12hour:!1},le.push("time")),"hours"===r)for("g"===t||"h"===t?(i=12,oe.is12hour=!0):i=24,oe.hours=[],s=12===i?1:0;s<(12===i?13:i);s++)(!Ie.isArray(ve.settings.enabled_hours)||-1<Ie.inArray(s,ve.settings.enabled_hours))&&oe.hours.push(s);else if("minutes"===r)for(oe.minutes=[],s=0;s<60;s++)(!Ie.isArray(ve.settings.enabled_minutes)||-1<Ie.inArray(s,ve.settings.enabled_minutes))&&oe.minutes.push(s);else if("seconds"===r)for(oe.seconds=[],s=0;s<60;s++)(!Ie.isArray(ve.settings.enabled_seconds)||-1<Ie.inArray(s,ve.settings.enabled_seconds))&&oe.seconds.push(s);else oe.ampm=["am","pm"]});for(i in 0===le.length&&(le=["years","months","days"]),-1===Ie.inArray(ve.settings.view,le)&&(ve.settings.view=le[le.length-1]),x=[],ve.settings.custom_classes)ve.settings.custom_classes.hasOwnProperty(i)&&-1===x.indexOf(i)&&x.push(i);for(a=0;a<2+x.length;a++)s=0===a?ve.settings.disabled_dates:1===a?ve.settings.enabled_dates:ve.settings.custom_classes[x[a-2]],Ie.isArray(s)&&0<s.length&&Ie.each(s,function(){var e,t,s,i,n=this.split(" ");for(e=0;e<4;e++){for(n[e]||(n[e]="*"),n[e]=-1<n[e].indexOf(",")?n[e].split(","):new Array(n[e]),t=0;t<n[e].length;t++)if(-1<n[e][t].indexOf("-")&&null!==(i=n[e][t].match(/^([0-9]+)\-([0-9]+)/))){for(s=Se(i[1]);s<=Se(i[2]);s++)-1===Ie.inArray(s,n[e])&&n[e].push(s+"");n[e].splice(t,1)}for(t=0;t<n[e].length;t++)n[e][t]=isNaN(Se(n[e][t]))?n[e][t]:Se(n[e][t])}0===a?he.push(n):1===a?pe.push(n):(void 0===_e[x[a-2]]&&(_e[x[a-2]]=[]),_e[x[a-2]].push(n))});var o,d,c=new Date,l=ve.settings.reference_date?ve.settings.reference_date:we.data("zdp_reference_date")&&void 0!==we.data("zdp_reference_date")?we.data("zdp_reference_date"):c;if(O=ne=void 0,L=l.getMonth(),S=c.getMonth(),R=l.getFullYear(),Y=c.getFullYear(),T=l.getDate(),Z=c.getDate(),!0===ve.settings.direction)ne=l;else if(!1===ve.settings.direction)J=(O=l).getMonth(),G=O.getFullYear(),Q=O.getDate();else if(!Ie.isArray(ve.settings.direction)&&Pe(ve.settings.direction)&&0<Se(ve.settings.direction)||Ie.isArray(ve.settings.direction)&&((o=ke(ve.settings.direction[0]))||!0===ve.settings.direction[0]||Pe(ve.settings.direction[0])&&0<ve.settings.direction[0])&&((d=ke(ve.settings.direction[1]))||!1===ve.settings.direction[1]||Pe(ve.settings.direction[1])&&0<=ve.settings.direction[1]))ne=o||new Date(R,L,T+(Ie.isArray(ve.settings.direction)?Se(!0===ve.settings.direction[0]?0:ve.settings.direction[0]):Se(ve.settings.direction))),L=ne.getMonth(),R=ne.getFullYear(),T=ne.getDate(),d&&+ne<=+d?O=d:!d&&!1!==ve.settings.direction[1]&&Ie.isArray(ve.settings.direction)&&(O=new Date(R,L,T+Se(ve.settings.direction[1]))),O&&(J=O.getMonth(),G=O.getFullYear(),Q=O.getDate());else if(!Ie.isArray(ve.settings.direction)&&Pe(ve.settings.direction)&&Se(ve.settings.direction)<0||Ie.isArray(ve.settings.direction)&&(!1===ve.settings.direction[0]||Pe(ve.settings.direction[0])&&ve.settings.direction[0]<0)&&((o=ke(ve.settings.direction[1]))||Pe(ve.settings.direction[1])&&0<=ve.settings.direction[1]))O=new Date(R,L,T+(Ie.isArray(ve.settings.direction)?Se(!1===ve.settings.direction[0]?0:ve.settings.direction[0]):Se(ve.settings.direction))),J=O.getMonth(),G=O.getFullYear(),Q=O.getDate(),o&&+o<+O?ne=o:!o&&Ie.isArray(ve.settings.direction)&&(ne=new Date(G,J,Q-Se(ve.settings.direction[1]))),ne&&(L=ne.getMonth(),R=ne.getFullYear(),T=ne.getDate());else if(Ie.isArray(ve.settings.disabled_dates)&&0<ve.settings.disabled_dates.length)for(var g in he)if("*"===he[g][0]&&"*"===he[g][1]&&"*"===he[g][2]&&"*"===he[g][3]){var _=[];if(Ie.each(pe,function(){var e=this;"*"!==e[2][0]&&_.push(parseInt(e[2][0]+("*"===e[1][0]?"12":Ze(e[1][0],2))+("*"===e[0][0]?"*"===e[1][0]?"31":new Date(e[2][0],e[1][0],0).getDate():Ze(e[0][0],2)),10))}),_.sort(),0<_.length){var h=(_[0]+"").match(/([0-9]{4})([0-9]{2})([0-9]{2})/);R=parseInt(h[1],10),L=parseInt(h[2],10)-1,T=parseInt(h[3],10)}break}if(Me(R,L,T)){for(;Me(R);)ne?(R++,L=0):(R--,L=11);for(;Me(R,L);)ne?(L++,T=1):(L--,T=new Date(R,L+1,0).getDate()),11<L?(R++,L=0,T=1):L<0&&(R--,L=11,T=new Date(R,L+1,0).getDate());for(;Me(R,L,T);)ne?T++:T--,c=new Date(R,L,T),R=c.getFullYear(),L=c.getMonth(),T=c.getDate();c=new Date(R,L,T),R=c.getFullYear(),L=c.getMonth(),T=c.getDate()}ve.settings.start_date&&"object"==typeof ve.settings.start_date&&ve.settings.start_date instanceof Date&&(ve.settings.start_date=Ae(ve.settings.start_date));var p=ke(we.val()||(ve.settings.start_date?ve.settings.start_date:""));if(p&&ve.settings.strict&&Me(p.getFullYear(),p.getMonth(),p.getDate())&&we.val(""),e||void 0===ne&&void 0===p||Ye(void 0!==p?p:ne),!(ve.settings.always_visible instanceof jQuery)){if(!e){if(ve.settings.show_icon){"firefox"===xe.name&&we.is('input[type="text"]')&&"inline"===we.css("display")&&we.css("display","inline-block");var u=parseInt(we.css("marginTop"),10)||0,f=parseInt(we.css("marginRight"),10)||0,m=parseInt(we.css("marginBottom"),10)||0,b=parseInt(we.css("marginLeft"),10)||0,y=Ie('<span class="Zebra_DatePicker_Icon_Wrapper"></span>').css({display:we.css("display"),position:"static"===we.css("position")?"relative":we.css("position"),"float":we.css("float"),top:we.css("top"),right:we.css("right"),bottom:we.css("bottom"),left:we.css("left"),marginTop:u<0?u:0,marginRight:f<0?f:0,marginBottom:m<0?m:0,marginLeft:b<0?b:0,paddingTop:u,paddingRight:f,paddingBottom:m,paddingLeft:b});"block"===we.css("display")&&y.css("width",we.outerWidth(!0)),we.wrap(y).css({position:"relative","float":"none",top:"auto",right:"auto",bottom:"auto",left:"auto",marginTop:0,marginRight:0,marginBottom:0,marginLeft:0}),E=Ie('<button type="button" class="Zebra_DatePicker_Icon'+("disabled"===we.attr("disabled")?" Zebra_DatePicker_Icon_Disabled":"")+'">Pick a date</button>'),ve.icon=E,C=ve.settings.open_icon_only?E:E.add(we)}else C=we;C.on("click.Zebra_DatePicker_"+me+(ve.settings.open_on_focus?" focus.Zebra_DatePicker_"+me:""),function(){I.hasClass("dp_hidden")&&!we.attr("disabled")&&(!be||ve.settings.readonly_element?ve.show():(clearTimeout(ae),ae=setTimeout(function(){ve.show()},600)))}),C.on("keydown.Zebra_DatePicker_"+me,function(e){9!==e.keyCode||I.hasClass("dp_hidden")||ve.hide()}),!ve.settings.readonly_element&&ve.settings.pair&&we.on("blur.Zebra_DatePicker_"+me,function(){var e;(e=ke(Ie(this).val()))&&!Me(e.getFullYear(),e.getMonth(),e.getDate())&&Ye(e)}),void 0!==E&&E.insertAfter(we)}if(void 0!==E){E.attr("style","");var v=we.outerWidth(),w=we.outerHeight(),k=E.outerWidth(),D=E.outerHeight();E.css("top",(w-D)/2),ve.settings.inside?"right"===ve.settings.icon_position?(E.css("right",!1!==ve.settings.icon_margin?ve.settings.icon_margin:ue.padding_right),we.css("paddingRight",2*(!1!==ve.settings.icon_margin?ve.settings.icon_margin:ue.padding_right)+k)):(E.css("left",!1!==ve.settings.icon_margin?ve.settings.icon_margin:ue.padding_left),we.css("paddingLeft",2*(!1!==ve.settings.icon_margin?ve.settings.icon_margin:ue.padding_left)+k)):E.css("left",v+(!1!==ve.settings.icon_margin?ve.settings.icon_margin:ue.padding_left)),E.removeClass("Zebra_DatePicker_Icon_Disabled"),"disabled"===we.attr("disabled")&&E.addClass("Zebra_DatePicker_Icon_Disabled")}}if(ie=!1!==ve.settings.show_select_today&&-1<Ie.inArray("days",le)&&!Me(Y,S,Z)&&ve.settings.show_select_today,e)return Ie(".dp_previous",I).html(ve.settings.navigation[0]),Ie(".dp_next",I).html(ve.settings.navigation[1]),Ie(".dp_time_controls_increase .dp_time_control",I).html(ve.settings.navigation[2]),Ie(".dp_time_controls_decrease .dp_time_control",I).html(ve.settings.navigation[3]),Ie(".dp_clear",I).html(ve.settings.lang_clear_date),void Ie(".dp_today",I).html(ve.settings.show_select_today);Ie(window).on("resize.Zebra_DatePicker_"+me+", orientationchange.Zebra_DatePicker_"+me,function(){ve.hide()});var A='<div class="Zebra_DatePicker"><table class="dp_header dp_actions"><tr><td class="dp_previous">'+ve.settings.navigation[0]+(ye?"&#xFE0E;":"")+'</td><td class="dp_caption"></td><td class="dp_next">'+ve.settings.navigation[1]+(ye?"&#xFE0E;":"")+'</td></tr></table><table class="dp_daypicker'+(ve.settings.show_week_number?" dp_week_numbers":"")+' dp_body"></table><table class="dp_monthpicker dp_body"></table><table class="dp_yearpicker dp_body"></table><table class="dp_timepicker dp_body"></table><table class="dp_footer dp_actions"><tr><td class="dp_today">'+ie+'</td><td class="dp_clear">'+ve.settings.lang_clear_date+'</td><td class="dp_view_toggler dp_icon">&nbsp;&nbsp;&nbsp;&nbsp;</td><td class="dp_confirm dp_icon"></td></tr></table></div>';I=Ie(A),B=Ie("table.dp_header",I),z=Ie("table.dp_daypicker",I),U=Ie("table.dp_monthpicker",I),de=Ie("table.dp_yearpicker",I),re=Ie("table.dp_timepicker",I),W=Ie("table.dp_footer",I),se=Ie("td.dp_today",W),P=Ie("td.dp_clear",W),K=Ie("td.dp_view_toggler",W),F=Ie("td.dp_confirm",W),ve.settings.always_visible instanceof jQuery?we.attr("disabled")||(ve.settings.always_visible.append(I),ve.show()):ve.settings.container.append(I),I.on("mouseover","td:not(.dp_disabled)",function(){Ie(this).addClass("dp_hover")}).on("mouseout","td:not(.dp_disabled)",function(){Ie(this).removeClass("dp_hover")}),De(I),Ie(".dp_previous",B).on("click",function(){"months"===ce?te--:"years"===ce?te-=12:--ee<0&&(ee=11,te--),Ce()}),Ie(".dp_caption",B).on("click",function(){ce="days"===ce?-1<Ie.inArray("months",le)?"months":-1<Ie.inArray("years",le)?"years":"days":"months"===ce?-1<Ie.inArray("years",le)?"years":-1<Ie.inArray("days",le)?"days":"months":-1<Ie.inArray("days",le)?"days":-1<Ie.inArray("months",le)?"months":"years",Ce()}),Ie(".dp_next",B).on("click",function(){"months"===ce?te++:"years"===ce?te+=12:12==++ee&&(ee=0,te++),Ce()}),z.on("click","td:not(.dp_disabled)",function(){var e;ve.settings.select_other_months&&Ie(this).attr("class")&&null!==(e=Ie(this).attr("class").match(/date\_([0-9]{4})(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])/))?Fe(e[1],e[2]-1,e[3],"days",Ie(this)):Fe(te,ee,Se(Ie(this).html()),"days",Ie(this))}),U.on("click","td:not(.dp_disabled)",function(){var e=Ie(this).attr("class").match(/dp\_month\_([0-9]+)/);ee=Se(e[1]),-1===Ie.inArray("days",le)?Fe(te,ee,1,"months",Ie(this)):(ce="days",ve.settings.always_visible&&we.val(""),Ce())}),de.on("click","td:not(.dp_disabled)",function(){te=Se(Ie(this).html()),-1===Ie.inArray("months",le)?Fe(te,1,1,"years",Ie(this)):(ce="months",ve.settings.always_visible&&we.val(""),Ce())}),se.on("click",function(e){var t=new Date;e.preventDefault(),Fe(t.getFullYear(),t.getMonth(),t.getDate(),"days",Ie(".dp_current",z))}),P.on("click",function(e){e.preventDefault(),we.val(""),H=N=j=null,ve.settings.always_visible?Ie("td.dp_selected",I).removeClass("dp_selected"):te=ee=null,we.focus(),ve.hide(),ve.settings.onClear&&"function"==typeof ve.settings.onClear&&ve.settings.onClear.call(we)}),K.on("click",function(){"time"!==ce?(ce="time",Ce()):Ie(".dp_caption",B).trigger("click")}),F.on("click",function(){if(Ie(".dp_time_controls_increase td",re).trigger("click"),Ie(".dp_time_controls_decrease td",re).trigger("click"),ve.settings.onSelect&&"function"==typeof ve.settings.onSelect){var e=new Date(te,ee,j,oe&&oe.hours?V+(oe.ampm&&("pm"===X&&V<12||"am"===X&&12===V)?12:0):0,oe&&oe.minutes?$:0,oe&&oe.seconds?q:0);ve.settings.onSelect.call(we,Ae(e),te+"-"+Ze(ee+1,2)+"-"+Ze(j,2)+(oe?" "+Ze(e.getHours(),2)+":"+Ze(e.getMinutes(),2)+":"+Ze(e.getSeconds(),2):""),e)}ve.hide()}),I.on("click",".dp_time_controls_increase td, .dp_time_controls_decrease td",function(){var e,t=0<Ie(this).parent(".dp_time_controls_increase").length,s=Ie(this).attr("class").match(/dp\_time\_([^\s]+)/i),i=Ie(".dp_time_segments .dp_time_"+s[1]+("ampm"!==s[1]?"s":""),re),n=i.text().toLowerCase(),a=oe[s[1]+("ampm"!==s[1]?"s":"")],r=Ie.inArray("ampm"!==s[1]?parseInt(n,10):n,a),o=-1===r?0:t?r+1>=a.length?0:r+1:r-1<0?a.length-1:r-1;"hour"===s[1]?V=a[o]:"minute"===s[1]?$=a[o]:"second"===s[1]?q=a[o]:X=a[o],!j&&ve.settings.start_date&&(e=ke(ve.settings.start_date))&&(j=e.getDate()),j||(j=T),i.text(Ze(a[o],2).toUpperCase()),Fe(te,ee,j)}),ve.settings.always_visible instanceof jQuery||(Ie(document).on("touchmove.Zebra_DatePicker_"+me,function(){fe=!0}),Ie(document).on("mousedown.Zebra_DatePicker_"+me+" touchend.Zebra_DatePicker_"+me,function(e){if("touchend"===e.type&&fe)return fe=!(be=!0);fe=!1,I.hasClass("dp_hidden")||(!ve.settings.open_icon_only||!ve.icon||Ie(e.target).get(0)===ve.icon.get(0))&&(ve.settings.open_icon_only||Ie(e.target).get(0)===we.get(0)||ve.icon&&Ie(e.target).get(0)===ve.icon.get(0))||0!==Ie(e.target).parents().filter(".Zebra_DatePicker").length||ve.hide(!0)}),Ie(document).on("keyup.Zebra_DatePicker_"+me,function(e){I.hasClass("dp_hidden")||27!==e.which||ve.hide()})),Ce()};ve.clear_date=function(){Ie(P).trigger("click")},ve.destroy=function(){void 0!==ve.icon&&(ve.icon.off("click.Zebra_DatePicker_"+me),ve.icon.off("focus.Zebra_DatePicker_"+me),ve.icon.off("keydown.Zebra_DatePicker_"+me),ve.icon.remove()),I.off(),I.remove(),!ve.settings.show_icon||ve.settings.always_visible instanceof jQuery||we.unwrap(),we.off("blur.Zebra_DatePicker_"+me),we.off("click.Zebra_DatePicker_"+me),we.off("focus.Zebra_DatePicker_"+me),we.off("keydown.Zebra_DatePicker_"+me),we.off("mousedown.Zebra_DatePicker_"+me),Ie(document).off("keyup.Zebra_DatePicker_"+me),Ie(document).off("mousedown.Zebra_DatePicker_"+me),Ie(document).off("touchend.Zebra_DatePicker_"+me),Ie(window).off("resize.Zebra_DatePicker_"+me),Ie(window).off("orientationchange.Zebra_DatePicker_"+me),we.removeData("Zebra_DatePicker"),we.attr("readonly",ue.readonly),we.attr("style",ue.style?ue.style:""),we.css("paddingLeft",ue.padding_left),we.css("paddingRight",ue.padding_right)},ve.hide=function(e){ve.settings.always_visible&&!e||(l("hide"),I.addClass("dp_hidden"),ve.settings.onClose&&"function"==typeof ve.settings.onClose&&ve.settings.onClose.call(we))},ve.set_date=function(e){var t;"object"==typeof e&&e instanceof Date&&(e=Ae(e)),(t=ke(e))&&!Me(t.getFullYear(),t.getMonth(),t.getDate())&&(we.val(e),Ye(t))},ve.show=function(){ce=ve.settings.view;var e,t=ke(we.val()||(ve.settings.start_date?ve.settings.start_date:""));if(t?(N=t.getMonth(),ee=t.getMonth(),H=t.getFullYear(),te=t.getFullYear(),j=t.getDate(),Me(H,N,j)&&(ve.settings.strict&&we.val(""),ee=L,te=R)):(ee=L,te=R),oe&&(e=t||new Date,V=e.getHours(),$=e.getMinutes(),q=e.getSeconds(),X=12<=V?"pm":"am",oe.is12hour&&(V=V%12==0?12:V%12),Ie.isArray(ve.settings.enabled_hours)&&-1===Ie.inArray(V,ve.settings.enabled_hours)&&(V=ve.settings.enabled_hours[0]),Ie.isArray(ve.settings.enabled_minutes)&&-1===Ie.inArray($,ve.settings.enabled_minutes)&&($=ve.settings.enabled_minutes[0]),Ie.isArray(ve.settings.enabled_seconds)&&-1===Ie.inArray(q,ve.settings.enabled_seconds)&&(q=ve.settings.enabled_seconds[0])),Ce(),ve.settings.always_visible instanceof jQuery)I.removeClass("dp_hidden");else{if(ve.settings.container.is("body")){var s=I.outerWidth(),i=I.outerHeight(),n=(void 0!==E?E.offset().left+E.outerWidth(!0):we.offset().left+we.outerWidth(!0))+ve.settings.offset[0],a=(void 0!==E?E.offset().top:we.offset().top)-i+ve.settings.offset[1],r=Ie(window).width(),o=Ie(window).height(),d=Ie(window).scrollTop(),c=Ie(window).scrollLeft();"below"===ve.settings.default_position&&(a=(void 0!==E?E.offset().top:we.offset().top)+ve.settings.offset[1]),c+r<n+s&&(n=c+r-s),n<c&&(n=c),d+o<a+i&&(a=d+o-i),a<d&&(a=d),I.css({left:n,top:a})}else I.css({left:0,top:0});I.removeClass("dp_hidden"),l()}ve.settings.onOpen&&"function"==typeof ve.settings.onOpen&&ve.settings.onOpen.call(we)},ve.update=function(e){ve.original_direction&&(ve.original_direction=ve.direction),ve.settings=Ie.extend(ve.settings,e),t(!0)};var ke=function(e){if(e+="",""!==Ie.trim(e)){for(var s=w(ve.settings.format),t=["d","D","j","l","N","S","w","F","m","M","n","Y","y","G","g","H","h","i","s","a","A"],i=[],n=[],a=null,r=null,o=0;o<t.length;o++)-1<(a=s.indexOf(t[o]))&&i.push({character:t[o],position:a});if(i.sort(function(e,t){return e.position-t.position}),Ie.each(i,function(e,t){switch(t.character){case"d":n.push("0[1-9]|[12][0-9]|3[01]");break;case"D":n.push("[a-z]{3}");break;case"j":n.push("[1-9]|[12][0-9]|3[01]");break;case"l":n.push("[a-zÀ-ɏ]+");break;case"N":n.push("[1-7]");break;case"S":n.push("st|nd|rd|th");break;case"w":n.push("[0-6]");break;case"F":n.push("[a-z]+");break;case"m":n.push("0[1-9]|1[012]");break;case"M":n.push("[a-z]{3}");break;case"n":n.push("[1-9]|1[012]");break;case"Y":n.push("[0-9]{4}");break;case"y":n.push("[0-9]{2}");break;case"G":n.push("[1-9]|1[0-9]|2[0123]");break;case"g":n.push("[0-9]|1[012]");break;case"H":n.push("0[0-9]|1[0-9]|2[0123]");break;case"h":n.push("0[0-9]|1[012]");break;case"i":case"s":n.push("0[0-9]|[12345][0-9]");break;case"a":n.push("am|pm");break;case"A":n.push("AM|PM")}}),n.length&&(i.reverse(),Ie.each(i,function(e,t){s=s.replace(t.character,"("+n[n.length-e-1]+")")}),n=new RegExp("^"+s+"$","ig"),r=n.exec(e))){var d,c,l=new Date,g=1,_=l.getMonth()+1,h=l.getFullYear(),p=l.getHours(),u=l.getMinutes(),f=l.getSeconds(),m=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b=["January","February","March","April","May","June","July","August","September","October","November","December"],y=!0;if(i.reverse(),Ie.each(i,function(s,i){if(!y)return!0;switch(i.character){case"m":case"n":_=Se(r[s+1]);break;case"d":case"j":g=Se(r[s+1]);break;case"D":case"l":case"F":case"M":c="D"===i.character||"l"===i.character?ve.settings.days:ve.settings.months,y=!1,Ie.each(c,function(e,t){if(y)return!0;if(r[s+1].toLowerCase()===t.substring(0,"D"===i.character||"M"===i.character?3:t.length).toLowerCase()){switch(i.character){case"D":r[s+1]=m[e].substring(0,3);break;case"l":r[s+1]=m[e];break;case"F":r[s+1]=b[e],_=e+1;break;case"M":r[s+1]=b[e].substring(0,3),_=e+1}y=!0}});break;case"Y":h=Se(r[s+1]);break;case"y":h="19"+Se(r[s+1]);break;case"G":case"H":case"g":case"h":p=Se(r[s+1]);break;case"i":u=Se(r[s+1]);break;case"s":f=Se(r[s+1]);break;case"a":case"A":d=r[s+1].toLowerCase()}}),y){var v=new Date(h,(_||1)-1,g||1,p+("pm"===d&&12!==p?12:"am"===d&&12===p?-12:0),u,f);if(v.getFullYear()===h&&v.getDate()===(g||1)&&v.getMonth()===(_||1)-1)return v}}return!1}},De=function(e){"firefox"===xe.name?e.css("MozUserSelect","none"):"explorer"===xe.name?Ie(document).on("selectstart",e,function(){return!1}):e.mousedown(function(){return!1})},w=function(e){return e.replace(/([-.,*+?^${}()|[\]\/\\])/g,"\\$1")},Ae=function(e){var t,s,i="",n=e.getDate(),a=e.getDay(),r=ve.settings.days[a],o=e.getMonth()+1,d=ve.settings.months[o-1],c=e.getFullYear()+"",l=e.getHours(),g=l%12==0?12:l%12,_=e.getMinutes(),h=e.getSeconds(),p=12<=l?"pm":"am";for(t=0;t<ve.settings.format.length;t++)switch(s=ve.settings.format.charAt(t)){case"y":c=c.substr(2);case"Y":i+=c;break;case"m":o=Ze(o,2);case"n":i+=o;break;case"M":d=Ie.isArray(ve.settings.months_abbr)&&void 0!==ve.settings.months_abbr[o-1]?ve.settings.months_abbr[o-1]:ve.settings.months[o-1].substr(0,3);case"F":i+=d;break;case"d":n=Ze(n,2);case"j":i+=n;break;case"D":r=Ie.isArray(ve.settings.days_abbr)&&void 0!==ve.settings.days_abbr[a]?ve.settings.days_abbr[a]:ve.settings.days[a].substr(0,3);case"l":i+=r;break;case"N":a++;case"w":i+=a;break;case"S":i+=n%10==1&&"11"!==n?"st":n%10==2&&"12"!==n?"nd":n%10==3&&"13"!==n?"rd":"th";break;case"g":i+=g;break;case"h":i+=Ze(g,2);break;case"G":i+=l;break;case"H":i+=Ze(l,2);break;case"i":i+=Ze(_,2);break;case"s":i+=Ze(h,2);break;case"a":i+=p;break;case"A":i+=p.toUpperCase();break;default:i+=s}return i},n=function(){var e,t,s,i,n,a,r,o,d,c,l,g=new Date(te,ee+1,0).getDate(),_=new Date(te,ee,1).getDay(),h=new Date(te,ee,0).getDate(),p=_-ve.settings.first_day_of_week;for(p=p<0?7+p:p,m(ve.settings.header_captions.days),t="<tr>",ve.settings.show_week_number&&(t+="<th>"+ve.settings.show_week_number+"</th>"),e=0;e<7;e++)t+="<th>"+(Ie.isArray(ve.settings.days_abbr)&&void 0!==ve.settings.days_abbr[(ve.settings.first_day_of_week+e)%7]?ve.settings.days_abbr[(ve.settings.first_day_of_week+e)%7]:ve.settings.days[(ve.settings.first_day_of_week+e)%7].substr(0,2))+"</th>";for(t+="</tr><tr>",e=0;e<42;e++)0<e&&e%7==0&&(t+="</tr><tr>"),e%7==0&&ve.settings.show_week_number&&(t+="<th>"+b(new Date(te,ee,e-p+1))+"</th>"),s=e-p+1,ve.settings.select_other_months&&(e<p||g<s)&&(n=(i=new Date(te,ee,s)).getFullYear(),a=i.getMonth(),r=i.getDate(),i=n+Ze(a+1,2)+Ze(r,2)),o=(ve.settings.first_day_of_week+e)%7,l=-1<Ie.inArray(o,ve.settings.weekend_days),e<p?t+='<td class="dp_not_in_month '+(l?"dp_weekend ":"")+(ve.settings.select_other_months&&!Me(n,a,r)?"date_"+i:"dp_disabled")+'">'+(ve.settings.select_other_months||ve.settings.show_other_months?Ze(h-p+e+1,ve.settings.zero_pad?2:0):"&nbsp;")+"</td>":g<s?t+='<td class="dp_not_in_month '+(l?"dp_weekend ":"")+(ve.settings.select_other_months&&!Me(n,a,r)?"date_"+i:"dp_disabled")+'">'+(ve.settings.select_other_months||ve.settings.show_other_months?Ze(s-g,ve.settings.zero_pad?2:0):"&nbsp;")+"</td>":(d="",c=f(te,ee,s),l&&(d=" dp_weekend"),ee===S&&te===Y&&Z===s&&(d+=" dp_current"),""!==c&&(d+=" "+c),ee===N&&te===H&&j===s&&(d+=" dp_selected"),Me(te,ee,s)&&(d+=" dp_disabled"),t+="<td"+(""!==d?' class="'+Ie.trim(d)+'"':"")+">"+((ve.settings.zero_pad?Ze(s,2):s)||"&nbsp;")+"</td>");t+="</tr>",z.html(Ie(t)),ve.settings.always_visible&&(u=Ie("td:not(.dp_disabled)",z)),z.show()},f=function(s,i,n){var a,e,r;for(e in void 0!==i&&(i+=1),x)if(a=x[e],r=!1,Ie.isArray(_e[a])&&Ie.each(_e[a],function(){if(!r){var e,t=this;if((-1<Ie.inArray(s,t[2])||-1<Ie.inArray("*",t[2]))&&(void 0!==i&&-1<Ie.inArray(i,t[1])||-1<Ie.inArray("*",t[1]))&&(void 0!==n&&-1<Ie.inArray(n,t[0])||-1<Ie.inArray("*",t[0]))){if(-1<Ie.inArray("*",t[3]))return r=a;if(e=new Date(s,i-1,n).getDay(),-1<Ie.inArray(e,t[3]))return r=a}}}),r)return r;return r||""},l=function(e){var t,s;if("explorer"===xe.name&&6===xe.version)switch(i||(t=Se(I.css("zIndex"))-1,i=Ie("<iframe>",{src:'javascript:document.write("")',scrolling:"no",frameborder:0,css:{zIndex:t,position:"absolute",top:-1e3,left:-1e3,width:I.outerWidth(),height:I.outerHeight(),filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)",display:"none"}}),Ie("body").append(i)),e){case"hide":i.hide();break;default:s=I.offset(),i.css({top:s.top,left:s.left,display:"block"})}},Me=function(s,i,n){var e,t,a,r;if(!(void 0!==s&&!isNaN(s)||void 0!==i&&!isNaN(i)||void 0!==n&&!isNaN(n)))return!1;if(s<1e3)return!0;if(Ie.isArray(ve.settings.direction)||0!==Se(ve.settings.direction)){if(8===(t=((e=Se(o(s,void 0!==i?Ze(i,2):"",void 0!==n?Ze(n,2):"")))+"").length)&&(void 0!==ne&&e<Se(o(R,Ze(L,2),Ze(T,2)))||void 0!==O&&e>Se(o(G,Ze(J,2),Ze(Q,2)))))return!0;if(6===t&&(void 0!==ne&&e<Se(o(R,Ze(L,2)))||void 0!==O&&e>Se(o(G,Ze(J,2)))))return!0;if(4===t&&(void 0!==ne&&e<R||void 0!==O&&G<e))return!0}return void 0!==i&&(i+=1),r=a=!1,Ie.isArray(he)&&he.length&&Ie.each(he,function(){if(!a){var e,t=this;if((-1<Ie.inArray(s,t[2])||-1<Ie.inArray("*",t[2]))&&(void 0!==i&&-1<Ie.inArray(i,t[1])||-1<Ie.inArray("*",t[1]))&&(void 0!==n&&-1<Ie.inArray(n,t[0])||-1<Ie.inArray("*",t[0]))){if(-1<Ie.inArray("*",t[3]))return a=!0;if(e=new Date(s,i-1,n).getDay(),-1<Ie.inArray(e,t[3]))return a=!0}}}),pe&&Ie.each(pe,function(){if(!r){var e,t=this;if((-1<Ie.inArray(s,t[2])||-1<Ie.inArray("*",t[2]))&&(r=!0,void 0!==i))if(r=!0,-1<Ie.inArray(i,t[1])||-1<Ie.inArray("*",t[1])){if(void 0!==n)if(r=!0,-1<Ie.inArray(n,t[0])||-1<Ie.inArray("*",t[0])){if(-1<Ie.inArray("*",t[3]))return r=!0;if(e=new Date(s,i-1,n).getDay(),-1<Ie.inArray(e,t[3]))return r=!0;r=!1}else r=!1}else r=!1}}),(!pe||!r)&&!(!he||!a)},Pe=function(e){return(e+"").match(/^\-?[0-9]+$/)},m=function(e){!isNaN(parseFloat(ee))&&isFinite(ee)&&(e=e.replace(/\bm\b|\bn\b|\bF\b|\bM\b/,function(e){switch(e){case"m":return Ze(ee+1,2);case"n":return ee+1;case"F":return ve.settings.months[ee];case"M":return Ie.isArray(ve.settings.months_abbr)&&void 0!==ve.settings.months_abbr[ee]?ve.settings.months_abbr[ee]:ve.settings.months[ee].substr(0,3);default:return e}})),!isNaN(parseFloat(te))&&isFinite(te)&&(e=e.replace(/\bY\b/,te).replace(/\by\b/,(te+"").substr(2)).replace(/\bY1\b/i,te-7).replace(/\bY2\b/i,te+4)),Ie(".dp_caption",B).html(e)},Ce=function(){var e,t,s;""===z.text()||"days"===ce?(""===z.text()?(ve.settings.always_visible instanceof jQuery||I.css("left",-1e3),I.removeClass("hidden"),n(),e=void 0!==z[0].getBoundingClientRect&&void 0!==z[0].getBoundingClientRect().height?z[0].getBoundingClientRect().height:z.outerHeight(!0),U.css("height",e),de.css("height",e),re.css("height",e+B.outerHeight(!0)),I.css("width",I.outerWidth()),I.addClass("dp_hidden")):n(),B.show(),U.hide(),de.hide(),re.hide(),K.hide(),F.hide(),oe&&K.show().removeClass("dp_calendar")):"months"===ce?(!function(){m(ve.settings.header_captions.months);var e,t,s="<tr>";for(e=0;e<12;e++)0<e&&e%3==0&&(s+="</tr><tr>"),t="dp_month_"+e,Me(te,e)?t+=" dp_disabled":!1!==N&&N===e&&te===H?t+=" dp_selected":S===e&&Y===te&&(t+=" dp_current"),s+='<td class="'+Ie.trim(t)+'">'+(Ie.isArray(ve.settings.months_abbr)&&void 0!==ve.settings.months_abbr[e]?ve.settings.months_abbr[e]:ve.settings.months[e].substr(0,3))+"</td>";s+="</tr>",U.html(Ie(s)),ve.settings.always_visible&&(d=Ie("td:not(.dp_disabled)",U)),U.show()}(),z.hide(),de.hide(),re.hide(),K.hide(),F.hide()):"years"===ce?(!function(){m(ve.settings.header_captions.years);var e,t,s="<tr>";for(e=0;e<12;e++)0<e&&e%3==0&&(s+="</tr><tr>"),t="",Me(te-7+e)?t+=" dp_disabled":H&&H===te-7+e?t+=" dp_selected":Y===te-7+e&&(t+=" dp_current"),s+="<td"+(""!==Ie.trim(t)?' class="'+Ie.trim(t)+'"':"")+">"+(te-7+e)+"</td>";s+="</tr>",de.html(Ie(s)),ve.settings.always_visible&&(c=Ie("td:not(.dp_disabled)",de)),de.show()}(),z.hide(),U.hide(),re.hide(),K.hide(),F.hide()):"time"===ce&&(s='<tr class="dp_time_controls_increase">'+(oe.hours?'<td class="dp_time_hour dp_time_control">'+ve.settings.navigation[2]+"</td>":"")+(oe.minutes?'<td class="dp_time_minute dp_time_control">'+ve.settings.navigation[2]+"</td>":"")+(oe.seconds?'<td class="dp_time_second dp_time_control">'+ve.settings.navigation[2]+"</td>":"")+(oe.ampm?'<td class="dp_time_ampm dp_time_control">'+ve.settings.navigation[2]+"</td>":"")+"</tr>",s+='<tr class="dp_time_segments">',oe.hours&&(s+='<td class="dp_time_hours dp_disabled'+(oe.minutes||oe.seconds||oe.ampm?" dp_time_separator":"")+'"><div>'+Ze(V,2)+"</div></td>"),oe.minutes&&(s+='<td class="dp_time_minutes dp_disabled'+(oe.seconds||oe.ampm?" dp_time_separator":"")+'"><div>'+Ze($,2)+"</div></td>"),oe.seconds&&(s+='<td class="dp_time_seconds dp_disabled'+(oe.ampm?" dp_time_separator":"")+'"><div>'+Ze(q,2)+"</div></td>"),oe.ampm&&(s+='<td class="dp_time_ampm dp_disabled">'+X.toUpperCase()+"</td>"),s+="</tr>",s+='<tr class="dp_time_controls_decrease">'+(oe.hours?'<td class="dp_time_hour dp_time_control">'+ve.settings.navigation[3]+"</td>":"")+(oe.minutes?'<td class="dp_time_minute dp_time_control">'+ve.settings.navigation[3]+"</td>":"")+(oe.seconds?'<td class="dp_time_second dp_time_control">'+ve.settings.navigation[3]+"</td>":"")+(oe.ampm?'<td class="dp_time_ampm dp_time_control">'+ve.settings.navigation[3]+"</td>":"")+"</tr>",re.html(Ie(s)),re.show(),1===le.length?(K.hide(),F.show()):(K.show().addClass("dp_calendar"),""===we.val()?F.hide():F.show()),B.hide(),z.hide(),U.hide(),de.hide()),"time"!==ce&&ve.settings.onChange&&"function"==typeof ve.settings.onChange&&void 0!==ce&&((t="days"===ce?z.find("td:not(.dp_disabled)"):"months"===ce?U.find("td:not(.dp_disabled)"):de.find("td:not(.dp_disabled)")).each(function(){var e;"days"===ce?Ie(this).hasClass("dp_not_in_month")&&!Ie(this).hasClass("dp_disabled")?(e=Ie(this).attr("class").match(/date\_([0-9]{4})(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])/),Ie(this).data("date",e[1]+"-"+e[2]+"-"+e[3])):Ie(this).data("date",te+"-"+Ze(ee+1,2)+"-"+Ze(Se(Ie(this).text()),2)):"months"===ce?(e=Ie(this).attr("class").match(/dp\_month\_([0-9]+)/),Ie(this).data("date",te+"-"+Ze(Se(e[1])+1,2))):Ie(this).data("date",Se(Ie(this).text()))}),ve.settings.onChange.call(we,ce,t)),W.show(),"time"===ce&&1<le.length?(se.hide(),P.hide(),K.css("width",""===we.val()?"100%":"50%")):(se.show(),P.show(),!0===ve.settings.show_clear_date||0===ve.settings.show_clear_date&&""!==we.val()||ve.settings.always_visible&&!1!==ve.settings.show_clear_date?ie?(se.css("width","50%"),P.css("width","50%")):(se.hide(),P.css("width",-1<Ie.inArray(le,"time")?"50%":"100%")):(P.hide(),ie?se.css("width","100%"):(se.hide(),(!oe||"time"!==ce&&"days"!==ce)&&W.hide())))},Fe=function(e,t,s,i,n){var a=new Date(e,t,s,oe&&oe.hours?V+(oe.ampm?"pm"===X&&12!==V?12:"am"===X&&12===V?-12:0:0):12,oe&&oe.minutes?$:0,oe&&oe.seconds?q:0),r="days"===i?u:"months"===i?d:c,o=Ae(a);we.val(o),(ve.settings.always_visible||oe)&&(N=a.getMonth(),ee=a.getMonth(),H=a.getFullYear(),te=a.getFullYear(),j=a.getDate(),n&&r&&(r.removeClass("dp_selected"),n.addClass("dp_selected"),"days"===i&&n.hasClass("dp_not_in_month")&&!n.hasClass("dp_disabled")&&ve.show())),oe?(ce="time",Ce()):(we.focus(),ve.hide()),Ye(a),!oe&&ve.settings.onSelect&&"function"==typeof ve.settings.onSelect&&ve.settings.onSelect.call(we,o,e+"-"+Ze(t+1,2)+"-"+Ze(s,2),a)},o=function(){var e,t="";for(e=0;e<arguments.length;e++)t+=arguments[e]+"";return t},Ze=function(e,t){for(e+="";e.length<t;)e="0"+e;return e},Se=function(e){return parseInt(e,10)},Ye=function(s){ve.settings.pair&&Ie.each(ve.settings.pair,function(){var e,t=Ie(this);t.data&&t.data("Zebra_DatePicker")?((e=t.data("Zebra_DatePicker")).update({reference_date:s,direction:0===e.settings.direction?1:e.settings.direction}),e.settings.always_visible&&e.show()):t.data("zdp_reference_date",s)})},b=function(e){var t,s,i,n,a,r,o,d=e.getFullYear(),c=e.getMonth()+1,l=e.getDate();return c<3?(i=(s=((t=d-1)/4|0)-(t/100|0)+(t/400|0))-(((t-1)/4|0)-((t-1)/100|0)+((t-1)/400|0)),n=0,a=l-1+31*(c-1)):(n=(i=(s=((t=d)/4|0)-(t/100|0)+(t/400|0))-(((t-1)/4|0)-((t-1)/100|0)+((t-1)/400|0)))+1,a=l+((153*(c-3)+2)/5|0)+58+i),(o=a+3-(l=(a+(r=(t+s)%7)-n)%7))<0?53-((r-i)/5|0):364+i<o?1:1+(o/7|0)},xe={init:function(){this.name=this.searchString(this.dataBrowser)||"",this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||""},searchString:function(e){var t,s,i;for(t=0;t<e.length;t++)if(s=e[t].string,i=e[t].prop,this.versionSearchString=e[t].versionSearch||e[t].identity,s){if(-1!==s.indexOf(e[t].subString))return e[t].identity}else if(i)return e[t].identity},searchVersion:function(e){var t=e.indexOf(this.versionSearchString);if(-1!==t)return parseFloat(e.substring(t+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"Firefox",identity:"firefox"},{string:navigator.userAgent,subString:"MSIE",identity:"explorer",versionSearch:"MSIE"}]};xe.init(),t()},Ie.fn.Zebra_DatePicker=function(t){return this.each(function(){void 0!==Ie(this).data("Zebra_DatePicker")&&Ie(this).data("Zebra_DatePicker").destroy();var e=new Ie.Zebra_DatePicker(this,t);Ie(this).data("Zebra_DatePicker",e)})},Ie.fn.Zebra_DatePicker.defaults={}});

@@ -82,2 +82,6 @@ $(document).ready(function() {

setTimeout(function() {
$.Zebra_Pin($('blockquote.bg-warning'));
}, 500);
});

@@ -15,3 +15,3 @@ {

"license": "LGPL-3.0",
"version": "1.9.10",
"version": "1.9.11",
"keywords": [

@@ -35,2 +35,3 @@ "jquery-plugin",

"grunt-contrib-copy": "*",
"grunt-contrib-cssmin": "*",
"grunt-contrib-jshint": "*",

@@ -43,4 +44,5 @@ "grunt-contrib-uglify": "*",

"grunt-sass": "*",
"node-sass": "*",
"time-grunt": "*"
}
}
<img src="https://raw.githubusercontent.com/stefangabos/zebrajs/master/docs/images/logo.png" alt="zebrajs" align="right">
# Zebra Datepicker
# Zebra Datepicker &nbsp;[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Zebra%20Datepicker%20-%20a%20super-lightweight,%20highly%20configurable,%20cross-browser%20date/time%20picker%20jQuery%20plugin&url=https://github.com/stefangabos/Zebra_Datepicker&via=stefangabos&hashtags=jquery,datepicker,timepicker,calendar,javascript)

@@ -150,7 +150,7 @@ *A super-lightweight, highly configurable, cross-browser date/time picker jQuery plugin*

<td valign="top"><em>mixed</em></td>
<td valign="top"><code>FALSE</code></td>
<td valign="top"><code>false</code></td>
<td valign="top">
Should the date picker be always visible?<br>
Setting this property to a jQuery element will result in the date picker being always visible, the indicated element acting as the date picker's container;<br><br>
Setting this property to boolean TRUE will result in the date picker not closing when selecting a date but only when the user clicks outside the date picker.
Setting this property to boolean <code>true</code> will result in the date picker not closing when selecting a date but only when the user clicks outside the date picker.
</td>

@@ -169,3 +169,3 @@ </tr>

<td valign="top"><em>Array</em></td>
<td valign="top"><code>FALSE</code></td>
<td valign="top"><code>false</code></td>
<td valign="top">

@@ -178,4 +178,4 @@ Dates that should have custom classes applied to them.<br>

<code>}</code><br><br>
...where <em>dates_to_apply_the_custom_class_to</em> is an array of dates in the same format as required for the <strong>disabled_dates</strong> property.<br><br>
Custom classes will be applied <strong>only</strong> in the day picker view and not on month/year views! Also note that the class name will have the <em>"_disabled"</em> suffix added if the day the class is applied to is disabled.<br><br>
...where <em>dates_to_apply_the_custom_class_to</em> is an array of dates in the same format as required for the <code>disabled_dates</code> property.<br><br>
Custom classes will be applied <strong>only in the day picker view</strong> and not on month/year views! Also note that the class name will have the <em>"_disabled"</em> suffix added if the day the class is applied to is disabled.<br><br>
In order for the styles in your custom classes to be applied, make sure you are using the following syntax:<br><br>

@@ -197,6 +197,6 @@ <code>.Zebra_DatePicker .dp_daypicker td.myclass1 { .. }</code><br>

<td valign="top"><em>mixed</em></td>
<td valign="top"><code>FALSE</code></td>
<td valign="top"><code>false</code></td>
<td valign="top">
Abbreviated names of days.<br><br>
By default, the abbreviated name of a day consists of the first 2 letters from the day's full name. While this is common for most languages, there are also exceptions for languages like Thai, Loa, Myanmar, etc. where this is not correct. For these cases, specify an array with the abbreviations to be used for the 7 days of the week; leave it <code>FALSE</code> to use the first 2 letters of a day's name as the abbreviation.
By default, the abbreviated name of a day consists of the first 2 letters from the day's full name. While this is common for most languages, there are also exceptions for languages like Thai, Loa, Myanmar, etc. where this is not correct. For these cases, specify an array with the abbreviations to be used for the 7 days of the week; leave it <code>false</code> to use the first 2 letters of a day's name as the abbreviation.
</td>

@@ -207,3 +207,3 @@ </tr>

<td valign="top"><em>string</em></td>
<td valign="top"><code>"above"</code></td>
<td valign="top"><code>'above'</code></td>
<td valign="top">

@@ -213,3 +213,3 @@ The position of the date picker relative to the element it is attached to.<br><br>

Possible values are <code>above</code> and <code>below</code>.<br><br>
<blockquote>This property will be ignored if <strong>always_visible</strong> or <strong>container</strong> properties are set!</blockquote>
<blockquote>This property will be ignored if <code>always_visible</code> or <code>container</code> properties are set!</blockquote>
</td>

@@ -231,11 +231,12 @@ </tr>

<ul>
<li>first item is boolean <code>TRUE</code> (calendar starts on the reference date), a <code>positive integer</code> (calendar starts n days after the reference date), or a <code>valid date</code> given in the format defined by the <em>format</em> attribute (calendar starts at the specified date), and the second item is boolean <code>FALSE</code> (the calendar has no ending date), a <code>positive integer</code> (calendar ends n days after the starting date), or a <code>valid date</code> given in the format defined by the <em>format</em> attribute and which occurs after the starting date (calendar ends at the specified date)<br><br></li>
<li>first item is boolean <code>FALSE</code> (calendar ends on the reference date), a <code>negative integer</code> (calendar ends n days before the reference date), or a <code>valid date</code> given in the format defined by the <em>format</em> attribute (calendar ends at the specified date), and the second item is a <code>positive integer</code> (calendar ends n days before the ending date), or a <code>valid date</code> given in the format defined by the <em>format</em> attribute and which occurs before the starting date (calendar starts at the specified date)</li>
<li>first item is boolean <code>true</code> (calendar starts on the reference date), a <code>positive integer</code> (calendar starts n days after the reference date), or a <code>valid date</code> given in the format defined by the <code>format</code> attribute (calendar starts at the specified date), and the second item is boolean <code>false</code> (the calendar has no ending date), a <code>positive integer</code> (calendar ends n days after the starting date), or a <code>valid date</code> given in the format defined by the <code>format</code> attribute and which occurs after the starting date (calendar ends at the specified date)<br><br></li>
<li>first item is boolean <code>false</code> (calendar ends on the reference date), a <code>negative integer</code> (calendar ends n days before the reference date), or a <code>valid date</code> given in the format defined by the <code>format</code> attribute (calendar ends at the specified date), and the second item is a <code>positive integer</code> (calendar ends n days before the ending date), or a <code>valid date</code> given in the format defined by the <code>format</code> attribute and which occurs before the starting date (calendar starts at the specified date)</li>
</ul>
Examples:<br><br>
<code>[1, 7]</code> calendar starts tomorrow and ends seven days after that<br>
<code>[true, 7]</code> calendar starts on the reference date and ends seven days after that<br>
<code>[true, 7]</code> calendar starts on the <em>reference date</em> and ends seven days after that<br>
<code>['2013-01-01', false]</code> calendar starts on January 1st 2013 and has no ending date ("format" is YYYY-MM-DD)<br>
<code>[false, '2012-01-01']</code> calendar ends on the reference date and starts on January 1st 2012 ("format" is YYYY-MM-DD)<br><br>
<blockquote>Note that <em>disabled_dates</em> property will still apply!</blockquote><br>
<blockquote><a name="reference_date"></a>The <em>reference date</em> is the current date unless the date picker is the <em>pair</em> of another date picker, case in which the reference date is the date selected in that date picker.</blockquote>
<code>[false, '2012-01-01']</code> calendar ends on the <em>reference date</em> and starts on January 1st 2012 ("format" is YYYY-MM-DD)<br><br>
<blockquote>Note that <code>disabled_dates</code> property will still apply!</blockquote><br>
<blockquote><a name="reference_date"></a>The <code>reference date</code> is the current date unless the date picker is the <code>pair</code> of another date picker, case in which the reference date is the date selected in that date picker.</blockquote>
</td>

@@ -247,3 +248,3 @@ </tr>

<td valign="top"><code>false</code></td>
<td valign="top">By default, setting a format that also involves time (<code>h</code>, <code>H</code>, <code>g</code>, <code>G</code>, <code>i</code>, <code>s</code>, <code>a</code>, <code>A</code>) will automatically enable the time picker. if you want to use a format that involves time but you don't want the time picker, set this property to <code>TRUE</code>.
<td valign="top">By default, setting a format that also involves time (<code>h</code>, <code>H</code>, <code>g</code>, <code>G</code>, <code>i</code>, <code>s</code>, <code>a</code>, <code>A</code>) will automatically enable the time picker. If you want to use a format that involves time but you don't want the time picker, set this property to <code>true</code>.
</td>

@@ -254,6 +255,7 @@ </tr>

<td valign="top"><em>mixed</em></td>
<td valign="top"><code>FALSE</code><br><small>no disabled dates</small></td>
<td valign="top"><code>false</code><br><small>no disabled dates</small></td>
<td valign="top">
An array of disabled dates in the following format: <code>'day month year weekday'</code> where <em>weekday</em> is optional and can be <code>0-6</code> (Saturday to Sunday).<br><br>
The syntax is similar to cron's syntax: the values are separated by spaces and may contain <code>*</code> (asterisk) <code>-</code> (dash) and <code>,</code> (comma) delimiters.<br><br>
Examples:<br><br>
<code>['1 1 2012']</code> would disable January 1, 2012<br>

@@ -272,5 +274,5 @@ <code>['* 1 2012']</code> would disable all days in January 2012<br>

<td valign="top"><em>mixed</em></td>
<td valign="top"><code>FALSE</code><br><small>all dates enabled</small></td>
<td valign="top"><code>false</code><br><small>all dates enabled</small></td>
<td valign="top">
An array of enabled dates in the same format as required for <em>disabled_dates</em> property. To be used together with the <em>disabled_dates</em> property by first setting the <em>disabled_dates</em> property to something like <code>[* * * *]</code> <em>(which will disable everything)</em> and the setting the <em>enabled_dates</em> property to, say, <code>[* * * 0,6]</code> to enable just weekends.
An array of enabled dates in the same format as required for <code>disabled_dates</code> property. To be used together with the <code>disabled_dates</code> property by first setting the <code>disabled_dates</code> property to something like <code>[* * * *]</code> <em>(which will disable everything)</em> and the setting the <code>enabled_dates</code> property to, say, <code>[* * * 0,6]</code> to enable just weekends.
</td>

@@ -281,3 +283,3 @@ </tr>

<td valign="top"><em>mixed</em></td>
<td valign="top"><code>FALSE</code><br><small>all hours are selectable</small></td>
<td valign="top"><code>false</code><br><small>all hours are selectable</small></td>
<td valign="top">

@@ -291,3 +293,3 @@ An array of selectable hours.<br><br>

<td valign="top"><em>mixed</em></td>
<td valign="top"><code>FALSE</code><br><small>all minutes are selectable</small></td>
<td valign="top"><code>false</code><br><small>all minutes are selectable</small></td>
<td valign="top">

@@ -301,3 +303,3 @@ An array of selectable minutes.<br><br>

<td valign="top"><em>mixed</em></td>
<td valign="top"><code>FALSE</code><br><small>all seconds are selectable</small></td>
<td valign="top"><code>false</code><br><small>all seconds are selectable</small></td>
<td valign="top">

@@ -320,9 +322,9 @@ An array of selectable seconds.<br><br>

<td valign="top"><em>string</em></td>
<td valign="top"><code>"Y-m-d"</code></td>
<td valign="top"><code>'Y-m-d'</code></td>
<td valign="top">
Format of the returned date.<br><br>
Accepts the following characters for date formatting: <code>d</code>, <code>D</code>, <code>j</code>, <code>l</code>, <code>N</code>, <code>w</code>, <code>S</code>, <code>F</code>, <code>m</code>, <code>M</code>, <code>n</code>, <code>Y</code>, <code>y</code>, <code>h</code>, <code>H</code>, <code>g</code>, <code>G</code>, <code>i</code>, <code>s</code>, <code>a</code>, <code>A</code>, borrowing the syntax from PHP's <a href="http://php.net/manual/en/function.date.php">date</a> function.<br><br>
If <code>format</code> property contains time-related characters (<code>g</code>, <code>G</code>, <code>h</code>, <code>H</code>, <code>i</code>, <code>s</code>, <code>a</code>, <code>A</code>), the time picker will be automatically enabled.<br><br><blockquote>If you want to use a format that involves time but you don't want the time picker, set the <code>disable_time_picker</code> property to TRUE.</blockquote>
If <code>format</code> property contains time-related characters (<code>g</code>, <code>G</code>, <code>h</code>, <code>H</code>, <code>i</code>, <code>s</code>, <code>a</code>, <code>A</code>), the time picker will be automatically enabled.<br><br><blockquote>If you want to use a format that involves time but you don't want the time picker, set the <code>disable_time_picker</code> property to true.</blockquote>
Note that when setting a date format without days (<code>d</code>, <code>j</code>), the users will be able to select only years and months, and when setting a format without months and days (<code>F</code>, <code>m</code>, <code>M</code>, <code>n</code>, <code>t</code>, <code>d</code>, <code>j</code>), the users will be able to select only years. Similarly, setting a format that contains only time-related characters, will result in users being able to only select time.<br><br>
Also note that the value of the <em>view</em> property may be overridden if it is the case (i.e. a value of <em>days</em> for the <em>view</em> property makes no sense if the date format doesn't allow the selection of days).
Also note that the value of the <code>view</code> property may be overridden if it is the case (i.e. a value of <code>days</code> for the <code>view</code> property makes no sense if the date format doesn't allow the selection of days).
</td>

@@ -356,8 +358,8 @@ </tr>

<td valign="top"><em>mixed</em></td>
<td valign="top"><code>FALSE</code></td>
<td valign="top"><code>false</code></td>
<td valign="top">
The left and right white-space around the icon<br><br>
If the <code>inside</code> property is set to <code>TRUE</code> then the target element's padding will be altered so that the element's left or right padding (depending on the value of <code>icon_position</code>) will be <code>2 x icon_margin</code> plus the icon's width.<br><br>
If the <code>inside</code> property is set to <code>FALSE</code>, then this will be the distance between the element and the icon.<br><br>
Leave it to <code>FALSE</code> to use the element's existing padding
If the <code>inside</code> property is set to <code>true</code> then the target element's padding will be altered so that the element's left or right padding (depending on the value of <code>icon_position</code>) will be <code>2 x icon_margin</code> plus the icon's width.<br><br>
If the <code>inside</code> property is set to <code>false</code>, then this will be the distance between the element and the icon.<br><br>
Leave it to <code>false</code> to use the element's existing padding
</td>

@@ -368,7 +370,6 @@ </tr>

<td valign="top"><em>string</em></td>
<td valign="top"><code>"right"</code></td>
<td valign="top"><code>'right'</code></td>
<td valign="top">
Icon's position.<br>
Accepted values are <code>left</code> and <code>right</code><br><br>
<blockquote>If the <code>inside</code> property is set to <code>TRUE</code>, this will always be <code>right</code>.</blockquote>
Accepted values are <code>left</code> and <code>right</code>
</td>

@@ -379,6 +380,6 @@ </tr>

<td valign="top"><em>boolean</em></td>
<td valign="top"><code>TRUE</code></td>
<td valign="top"><code>true</code></td>
<td valign="top">
Should the icon for opening the date picker be inside the element?<br><br>
If set to <code>FALSE</code>, the icon will be placed to the right of the parent element, while if set to <code>TRUE</code> it will be placed to the right of the parent element, but <em>inside</em> the element itself
If set to <code>false</code>, the icon will be placed to the right of the parent element, while if set to <code>true</code> it will be placed to the right of the parent element, but <em>inside</em> the element itself
</td>

@@ -389,3 +390,3 @@ </tr>

<td valign="top"><em>string</em></td>
<td valign="top"><code>"Clear"</code></td>
<td valign="top"><code>'Clear'</code></td>
<td valign="top">

@@ -406,6 +407,6 @@ the caption for the <em>Clear</em> button.

<td valign="top"><em>mixed</em></td>
<td valign="top"><code>FALSE</code></td>
<td valign="top"><code>false</code></td>
<td valign="top">
Abbreviated names of months.<br><br>
By default, the abbreviated name of a month consists of the first 3 letters from the month's full name. While this is common for most languages, there are also exceptions for languages like Thai, Loa, Myanmar, etc. where this is not correct. For these cases, specify an array with the abbreviations to be used for the months of the year; leave it FALSE to use the first 3 letters of a month's name as the abbreviation.
By default, the abbreviated name of a month consists of the first 3 letters from the month's full name. While this is common for most languages, there are also exceptions for languages like Thai, Loa, Myanmar, etc. where this is not correct. For these cases, specify an array with the abbreviations to be used for the months of the year; leave it <code>false</code> to use the first 3 letters of a month's name as the abbreviation.
</td>

@@ -433,5 +434,5 @@ </tr>

<td valign="top"><em>boolean</em></td>
<td valign="top"><code>FALSE</code></td>
<td valign="top"><code>false</code></td>
<td valign="top">
When set to <code>TRUE</code>, the date picker will show only when users click on the associated icon, and not also when clicking the associated element.
When set to <code>true</code>, the date picker will show only when users click on the associated icon, and not also when clicking the associated element.
</td>

@@ -442,5 +443,5 @@ </tr>

<td valign="top"><em>boolean</em></td>
<td valign="top"><code>FALSE</code></td>
<td valign="top"><code>false</code></td>
<td valign="top">
Set this property to <code>TRUE</code> if you want the date picker to be shown when the parent element (if <code>open_icon_only</code> is not set to <code>FALSE</code>) or the associated calendar icon (if <code>show_icon</code> is set to <code>TRUE</code>) receive focus.
Set this property to <code>true</code> if you want the date picker to be shown when the parent element (if <code>open_icon_only</code> is not set to <code>false</code>) or the associated calendar icon (if <code>show_icon</code> is set to <code>true</code>) receive focus.
</td>

@@ -451,6 +452,6 @@ </tr>

<td valign="top"><em>object</em></td>
<td valign="top"><code>FALSE</code><br><small>not paired with another date picker</small></td>
<td valign="top"><code>false</code><br><small>not paired with another date picker</small></td>
<td valign="top">
If set as one or more jQuery elements with Zebra Datepicker attached, those particular date pickers will use the current date picker's value as starting date<br><br>
Note that the rules set in the <em>direction</em> property will still apply but the reference date will not be the current system date but the value selected in the current date picker.<br><br>
Note that the rules set in the <code>direction</code> property will still apply but the reference date will not be the current system date but the value selected in the current date picker.<br><br>
<blockquote>Use this property only on the date picker containing the "starting date" and not also on the one with the "ending date", or the <code>direction</code> property of the second date picker will not work as expected!<blockquote>

@@ -462,6 +463,6 @@ </td>

<td valign="top"><em>boolean</em></td>
<td valign="top"><code>TRUE</code></td>
<td valign="top"><code>true</code></td>
<td valign="top">
Should the element the calendar is attached to, be read-only?<br><br>
If set to <code>TRUE</code>, a date can be set only through the date picker and cannot be entered manually.
If set to <code>true</code>, a date can be set only through the date picker and cannot be entered manually.
</td>

@@ -472,6 +473,6 @@ </tr>

<td valign="top"><em>boolean</em></td>
<td valign="top"><code>FALSE</code></td>
<td valign="top"><code>false</code></td>
<td valign="top">
Should days from previous and/or next month be selectable when visible?<br><br>
Note that if the value of this property is set to <code>TRUE</code>, the value of <em>show_other_months</em> will be considered <code>TRUE</code> regardless of the actual value!
Note that if the value of this property is set to <code>true</code>, the value of <code>show_other_months</code> will be considered <code>true</code> regardless of the actual value!
</td>

@@ -484,8 +485,8 @@ </tr>

<td valign="top">
Should the "Clear date" button be visible?<br><br>
Should the <em>Clear date</em> button be visible?<br><br>
Accepted values are:<br><br>
<ul>
<li><code>0</code> - the button for clearing a previously selected date is shown only if a previously selected date already exists; this means that if there's no date selected, this button will not be visible; once the user picked a date and opens the date picker again, this time the button will be visible.</li>
<li><code>TRUE</code> will make the button visible all the time</li>
<li><code>FALSE</code> will disable the button</li>
<li><code>true</code> will make the button visible all the time</li>
<li><code>false</code> will disable the button</li>
</ul>

@@ -497,6 +498,6 @@ </td>

<td valign="top"><em>boolean</em></td>
<td valign="top"><code>TRUE</code></td>
<td valign="top"><code>true</code></td>
<td valign="top">
Should a calendar icon be added to the elements the plugin is attached to?<br><br>
When set to <code>TRUE</code> the plugin will attach a calendar icon to the elements the plugin is attached to.
When set to <code>true</code> the plugin will attach a calendar icon to the elements the plugin is attached to.
</td>

@@ -507,3 +508,3 @@ </tr>

<td valign="top"><em>boolean</em></td>
<td valign="top"><code>TRUE</code></td>
<td valign="top"><code>true</code></td>
<td valign="top">

@@ -516,6 +517,6 @@ Should days from previous and/or next month be visible?

<td valign="top"><em>mixed</em></td>
<td valign="top"><code>"Today"</code></td>
<td valign="top"><code>'Today'</code></td>
<td valign="top">
Should the "Today" button be visible?<br><br>
Setting this property to anything but a boolean <code>FALSE</code> will enable the button and will use the property's value as caption for the button. Setting it to <code>FALSE</code> will disable the button.
Should the <em>Today</em> button be visible?<br><br>
Setting this property to anything but a boolean <code>false</code> will enable the button and will use the property's value as caption for the button. Setting it to <code>false</code> will disable the button.
</td>

@@ -526,6 +527,6 @@ </tr>

<td valign="top"><em>mixed</em></td>
<td valign="top"><code>FALSE</code></td>
<td valign="top"><code>false</code></td>
<td valign="top">
Should the ISO 8601 week number be displayed?<br><br>
Anything other than <code>FALSE</code> will enable this feature, and use the given value as column title. For example, <code>show_week_number: 'Wk'</code> would enable this feature and have <code>Wk</code> as the column's title.
Anything other than <code>false</code> will enable this feature, and use the given value as column title. For example, <code>show_week_number: 'Wk'</code> would enable this feature and have <em>Wk</em> as the column's title.
</td>

@@ -536,7 +537,8 @@ </tr>

<td valign="top"><em>mixed</em></td>
<td valign="top"><code>FALSE</code></td>
<td valign="top"><code>false</code></td>
<td valign="top">
A default date to start the date picker with<br><br>
Must be specified in the format defined by the <em>format</em> property, or it will be ignored!<br><br>
Must be specified in the format defined by the <code>format</code> property, or as a JavaScript Date object<br><br>
If you have a date format that contains time and you need to set a default time but the date should be the current date, here's one way of doing it:<br><br>
Prior to version <code>1.9.11</code>:<br><br>
<code>var date = new Date(); // have this somewhere</code><br><br>

@@ -549,3 +551,6 @@ <code>// set the start_date property like</code><br>

<code>&nbsp;&nbsp;' 12:00'</code><br><br>
Starting with version <code>1.9.11</code>:<br><br>
<code>start_date: new Date()</code><br><br>
<blockquote>Note that this value is used only if there is no value in the field the date picker is attached to!</blockquote>
<blockquote>The property's value can be a JavaScript Date object since version 1.9.11</blockquote>
</td>

@@ -556,5 +561,5 @@ </tr>

<td valign="top"><em>boolean</em></td>
<td valign="top"><code>FALSE</code></td>
<td valign="top"><code>false</code></td>
<td valign="top">
Should default values, in the input field the date picker is attached to, be deleted if they are not valid according to <em>direction</em> and/or <em>disabled_dates</em>?
Should default values, in the input field the date picker is attached to, be deleted if they are not valid according to <code>direction</code> and/or <code>disabled_dates</code>?
</td>

@@ -565,3 +570,3 @@ </tr>

<td valign="top"><em>string</em></td>
<td valign="top"><code>"days"</code></td>
<td valign="top"><code>'days'</code></td>
<td valign="top">

@@ -571,3 +576,3 @@ How should the date picker start:<br><br>

Note that the date picker is always cycling <code>days -> months -> years</code> when clicking in the date picker's header, and <code>years -> months -> days</code> when selecting dates (skipping the views that are missing because of the date's format)<br><br>
The value of the <em>view</em> property may be overridden if the date's format requires so! (i.e. <code>days</code> for the <em>view</em> property makes no sense if the date format doesn't allow the selection of days)
The value of the <code>view</code> property may be overridden if the date's format requires so! (i.e. <code>days</code> for the <code>view</code> property makes no sense if the date format doesn't allow the selection of days)
</td>

@@ -587,6 +592,6 @@ </tr>

<td valign="top"><em>boolean</em></td>
<td valign="top"><code>FALSE</code></td>
<td valign="top"><code>false</code></td>
<td valign="top">
Should day numbers < 10 be padded with zero?<br>
When set to <code>TRUE</code>, day numbers < 10 will be prefixed with <code>0</code>.
When set to <code>true</code>, day numbers < 10 will be prefixed with <code>0</code>.
</td>

@@ -601,3 +606,3 @@ </tr>

Callback to be executed whenever the user changes the view (days/months/years), as well as when the user navigates by clicking on the "next"/"previous" icons in any of the views;
Callback to be executed whenever the user changes the view (days/months/years), as well as when the user navigates by clicking on the <code>next/previous</code> icons in any of the views;

@@ -611,3 +616,3 @@ The callback function called receives 2 arguments

For simplifying searching for particular dates, each element gets a "date" data attribute whose format depends on the value of the `view` argument as follows:
For simplifying searching for particular dates, each element gets a `date` data attribute whose format depends on the value of the `view` argument as follows:

@@ -687,3 +692,3 @@ - `YYYY-MM-DD` for elements in the `days` view

- the date in the format specified by the <em>format</em> attribute
- the date in the format specified by the <code>format</code> attribute
- the date in <code>YYYY-MM-DD</code> format and additionally hours, minutes and seconds if time picker is enabled

@@ -719,13 +724,15 @@ - the date as a JavaScript Date object

The date must be in the format defined by the <em>format</em> property.
The date must be in the format defined by the <code>format</code> property <strong>or</strong> a JavaScript <code>Date</code> object.
The date will not be set if it is disabled (either because of <em>disabled_dates</em> or because of <em>direction</em>)
The date will not be set if it is disabled (either because of <code>disabled_dates</code> or because of <code>direction</code> properties)
<blockquote>The method's argument can be a JavaScript <code>Date</code> object since version <code>1.9.11</code></blockquote>
#### `show()`
Shows the date picker (unless the <em>always_visible</em> property is set to TRUE)
Shows the date picker (unless the <code>always_visible</code> property is set to <code>true</code>)
#### `hide()`
Hides the date picker (unless the <em>always_visible</em> property is set to TRUE)
Hides the date picker (unless the <code>always_visible</code> property is set to <code>true</code>)

@@ -732,0 +739,0 @@ #### `update([options])`

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc