//>>built
define("dojox/mobile/_DatePickerMixin","dojo/_base/array dojo/_base/declare dojo/_base/lang dojo/date dojo/date/locale dojo/date/stamp".split(" "),function(d,e,k,n,f,m){var l={format:function(a){return f.format(a,{datePattern:this.pattern,selector:"date",locale:this.picker.lang})}},p=k.mixin({initLabels:function(){this.labels=[];if(this.labelFrom!==this.labelTo){var a=new Date(this.labelFrom,0,1),b;var c=this.labelFrom;for(b=0;c<=this.labelTo;c++,b++)a.setFullYear(c),this.labels.push(this.format(a))}}},
l),q=k.mixin({initLabels:function(){this.labels=[];for(var a=new Date(2E3,0,16),b=0;12>b;b++)a.setMonth(b),this.labels.push(this.format(a))}},l),r=k.mixin({initLabels:function(){this.labels=[];for(var a=new Date(2E3,0,1),b=1;31>=b;b++)a.setDate(b),this.labels.push(this.format(a))}},l);return e("dojox.mobile._DatePickerMixin",null,{yearPattern:"yyyy",monthPattern:"MMM",dayPattern:"d",initSlots:function(){var a=this.slotClasses,b=this.slotProps;a[0]=e(a[0],p);a[1]=e(a[1],q);a[2]=e(a[2],r);b[2].picker=
b[1].picker=b[0].picker=this;b[0].pattern=this.yearPattern;b[1].pattern=this.monthPattern;b[2].pattern=this.dayPattern;this.reorderSlots()},reorderSlots:function(){if(!this.slotOrder.length){var a=f._parseInfo({locale:this.lang}).bundle["dateFormat-short"].toLowerCase().split(/[^ymd]+/,3);this.slotOrder=d.map(a,function(b){return{y:0,m:1,d:2}[b.charAt(0)]})}},reset:function(){var a=new Date,b=d.map(this.slots,function(c){return c.format(a)});this.set("colors",b);this._disableEndDaysOfMonth();this.value?
(this.set("value",this.value),this.value=null):this.values?(this.set("values",this.values),this.values=null):this.set("values",b)},_onYearSet:function(){var a=this.slots[0],b=a.get("value");a._previousValue&&b==a._previousValue||(this._disableEndDaysOfMonth(),a._previousValue=b,a._set("value",b),this.onYearSet())},onYearSet:function(){},_onMonthSet:function(){var a=this.slots[1],b=a.get("value");a._previousValue&&b==a._previousValue||(this._disableEndDaysOfMonth(),a._previousValue=b,a._set("value",
b),this.onMonthSet())},onMonthSet:function(){},_onDaySet:function(){var a=this.slots[2],b=a.get("value");a._previousValue&&b==a._previousValue||this._disableEndDaysOfMonth()||(a._previousValue=b,a._set("value",b),this.onDaySet())},onDaySet:function(){},_disableEndDaysOfMonth:function(){var a=this.slots[0].pattern+"/"+this.slots[1].pattern,b=this.get("values");a=f.parse(b[0]+"/"+b[1],{datePattern:a,selector:"date",locale:this.lang});a=n.getDaysInMonth(a);var c=!1;a<b[2]&&(c=!0,this.slots[2]._spinToValue(a,
!1));this.disableValues(a);return c},_getDateAttr:function(){var a=this.get("values"),b=this.slots;return f.parse(a[0]+"/"+a[1]+"/"+a[2],{datePattern:b[0].pattern+"/"+b[1].pattern+"/"+b[2].pattern,selector:"date",locale:this.lang})},_setValuesAttr:function(a){d.forEach(this.getSlots(),function(b,c){var g=a[c];if("number"==typeof g){var h=[1970,1,1];h.splice(c,1,g-0);g=b.format(new Date(h[0],h[1]-1,h[2]))}b.set("value",g)})},_setValueAttr:function(a){var b=m.fromISOString(a);this.set("values",d.map(this.slots,
function(c){return c.format(b)}))},_getValueAttr:function(){return m.toISOString(this.get("date"),{selector:"date"})}})});