/* Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ if(!dojo._hasResource["dijit.Calendar"]){ dojo._hasResource["dijit.Calendar"]=true; dojo.provide("dijit.Calendar"); dojo.require("dojo.cldr.supplemental"); dojo.require("dojo.date"); dojo.require("dojo.date.locale"); dojo.require("dijit._Widget"); dojo.require("dijit._Templated"); dojo.require("dijit._CssStateMixin"); dojo.declare("dijit.Calendar",[dijit._Widget,dijit._Templated,dijit._CssStateMixin],{templateString:dojo.cache("dijit","templates/Calendar.html","\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\n
\n\t\t\t\t\"\"\n\t\t\t\t-\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\t\"\"\n\t\t\t\t+\n\t\t\t
\n\t\t\t\t

\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t

\n\t\t\t
\n"),value:new Date(),datePackage:"dojo.date",dayWidth:"narrow",tabIndex:"0",baseClass:"dijitCalendar",cssStateNodes:{"decrementMonth":"dijitCalendarArrow","incrementMonth":"dijitCalendarArrow","previousYearLabelNode":"dijitCalendarPreviousYear","nextYearLabelNode":"dijitCalendarNextYear"},attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{tabIndex:"domNode"}),setValue:function(_1){ dojo.deprecated("dijit.Calendar:setValue() is deprecated. Use set('value', ...) instead.","","2.0"); this.set("value",_1); },_getValueAttr:function(){ var _2=new this.dateClassObj(this.value); _2.setHours(0,0,0,0); if(_2.getDate()_7){ _b-=7; } dojo.query(".dijitCalendarDateTemplate",this.domNode).forEach(function(_c,i){ i+=_b; var _d=new this.dateClassObj(_6),_e,_f="dijitCalendar",adj=0; if(i<_7){ _e=_9-_7+i+1; adj=-1; _f+="Previous"; }else{ if(i>=(_7+_8)){ _e=i-_7-_8+1; adj=1; _f+="Next"; }else{ _e=i-_7+1; _f+="Current"; } } if(adj){ _d=this.dateFuncObj.add(_d,"month",adj); } _d.setDate(_e); if(!this.dateFuncObj.compare(_d,_a,"date")){ _f="dijitCalendarCurrentDate "+_f; } if(this._isSelectedDate(_d,this.lang)){ _f="dijitCalendarSelectedDate "+_f; } if(this.isDisabledDate(_d,this.lang)){ _f="dijitCalendarDisabledDate "+_f; } var _10=this.getClassForDate(_d,this.lang); if(_10){ _f=_10+" "+_f; } _c.className=_f+"Month dijitCalendarDateTemplate"; _c.dijitDateValue=_d.valueOf(); var _11=dojo.query(".dijitCalendarDateLabel",_c)[0],_12=_d.getDateLocalized?_d.getDateLocalized(this.lang):_d.getDate(); this._setText(_11,_12); },this); var _13=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,_6); this._setText(this.monthLabelNode,_13[_6.getMonth()]); dojo.query(".dijitCalendarMonthLabelTemplate",this.domNode).forEach(function(_14,i){ dojo.toggleClass(_14,"dijitHidden",!(i in _13)); this._setText(_14,_13[i]); },this); var y=_6.getFullYear()-1; var d=new this.dateClassObj(); dojo.forEach(["previous","current","next"],function(_15){ d.setFullYear(y++); this._setText(this[_15+"YearLabelNode"],this.dateLocaleModule.format(d,{selector:"year",locale:this.lang})); },this); var _16=this; var _17=function(_18,_19,adj){ _16._connects.push(dijit.typematic.addMouseListener(_16[_18],_16,function(_1a){ if(_1a>=0){ _16._adjustDisplay(_19,adj); } },0.8,500)); }; _17("incrementMonth","month",1); _17("decrementMonth","month",-1); _17("nextYearLabelNode","year",1); _17("previousYearLabelNode","year",-1); },goToToday:function(){ this.set("value",new this.dateClassObj()); },constructor:function(_1b){ var _1c=(_1b.datePackage&&(_1b.datePackage!="dojo.date"))?_1b.datePackage+".Date":"Date"; this.dateClassObj=dojo.getObject(_1c,false); this.datePackage=_1b.datePackage||this.datePackage; this.dateFuncObj=dojo.getObject(this.datePackage,false); this.dateLocaleModule=dojo.getObject(this.datePackage+".locale",false); },postMixInProperties:function(){ if(isNaN(this.value)){ delete this.value; } this.inherited(arguments); },postCreate:function(){ this.inherited(arguments); dojo.setSelectable(this.domNode,false); var _1d=dojo.hitch(this,function(_1e,n){ var _1f=dojo.query(_1e,this.domNode)[0]; for(var i=0;i