/*
	Copyright (c) 2004-2011, 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
*/


window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojox.form.DateTextBox"],["require","dojox.widget.Calendar"],["require","dojox.widget.CalendarViews"],["require","dijit.form._DateTimeTextBox"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.form.DateTextBox"]){_4._hasResource["dojox.form.DateTextBox"]=true;_4.provide("dojox.form.DateTextBox");_4.experimental("dojox.form.DateTextBox");_4.require("dojox.widget.Calendar");_4.require("dojox.widget.CalendarViews");_4.require("dijit.form._DateTimeTextBox");_4.declare("dojox.form.DateTextBox",_5.form._DateTimeTextBox,{popupClass:"dojox.widget.Calendar",_selector:"date",openDropDown:function(){this.inherited(arguments);_4.style(this.dropDown.domNode.parentNode,"position","absolute");}});_4.declare("dojox.form.DayTextBox",_6.form.DateTextBox,{popupClass:"dojox.widget.DailyCalendar",parse:function(_7){return _7;},format:function(_8){return _8.getDate?_8.getDate():_8;},validator:function(_9){var _a=Number(_9);var _b=/(^-?\d\d*$)/.test(String(_9));return _9==""||_9==null||(_b&&_a>=1&&_a<=31);},_setValueAttr:function(_c,_d,_e){if(_c){if(_c.getDate){_c=_c.getDate();}}_5.form.TextBox.prototype._setValueAttr.call(this,_c,_d,_e);},openDropDown:function(){this.inherited(arguments);this.dropDown.onValueSelected=_4.hitch(this,function(_f){this.focus();setTimeout(_4.hitch(this,"closeDropDown"),1);_5.form.TextBox.prototype._setValueAttr.call(this,String(_f.getDate()),true,String(_f.getDate()));});}});_4.declare("dojox.form.MonthTextBox",_6.form.DateTextBox,{popupClass:"dojox.widget.MonthlyCalendar",selector:"date",postMixInProperties:function(){this.inherited(arguments);this.constraints.datePattern="MM";},format:function(_10){if(!_10&&_10!==0){return 1;}if(_10.getMonth){return _10.getMonth()+1;}return Number(_10)+1;},parse:function(_11,_12){return Number(_11)-1;},serialize:function(_13,_14){return String(_13);},validator:function(_15){var num=Number(_15);var _16=/(^-?\d\d*$)/.test(String(_15));return _15==""||_15==null||(_16&&num>=1&&num<=12);},_setValueAttr:function(_17,_18,_19){if(_17){if(_17.getMonth){_17=_17.getMonth();}}_5.form.TextBox.prototype._setValueAttr.call(this,_17,_18,_19);},openDropDown:function(){this.inherited(arguments);this.dropDown.onValueSelected=_4.hitch(this,function(_1a){this.focus();setTimeout(_4.hitch(this,"closeDropDown"),1);_5.form.TextBox.prototype._setValueAttr.call(this,_1a,true,_1a);});}});_4.declare("dojox.form.YearTextBox",_6.form.DateTextBox,{popupClass:"dojox.widget.YearlyCalendar",format:function(_1b){console.log("Year format "+_1b);if(typeof _1b=="string"){return _1b;}else{if(_1b.getFullYear){return _1b.getFullYear();}}return _1b;},validator:function(_1c){return _1c==""||_1c==null||/(^-?\d\d*$)/.test(String(_1c));},_setValueAttr:function(_1d,_1e,_1f){if(_1d){if(_1d.getFullYear){_1d=_1d.getFullYear();}}_5.form.TextBox.prototype._setValueAttr.call(this,_1d,_1e,_1f);},openDropDown:function(){this.inherited(arguments);console.log("yearly openDropDown and value = "+this.get("value"));this.dropDown.onValueSelected=_4.hitch(this,function(_20){this.focus();setTimeout(_4.hitch(this,"closeDropDown"),1);_5.form.TextBox.prototype._setValueAttr.call(this,_20,true,_20);});},parse:function(_21,_22){return _21||(this._isEmpty(_21)?null:undefined);},filter:function(val){if(val&&val.getFullYear){return val.getFullYear().toString();}return this.inherited(arguments);}});}}};});