/*
	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","dijit.form._DateTimeTextBox"],["require","dojo.date"],["require","dojo.date.locale"],["require","dojo.date.stamp"],["require","dijit.form.ValidationTextBox"],["require","dijit._HasDropDown"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dijit.form._DateTimeTextBox"]){_4._hasResource["dijit.form._DateTimeTextBox"]=true;_4.provide("dijit.form._DateTimeTextBox");_4.require("dojo.date");_4.require("dojo.date.locale");_4.require("dojo.date.stamp");_4.require("dijit.form.ValidationTextBox");_4.require("dijit._HasDropDown");new Date("X");_4.declare("dijit.form._DateTimeTextBox",[_5.form.RangeBoundTextBox,_5._HasDropDown],{templateString:_4.cache("dijit.form","templates/DropDownBox.html","<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\r\n\tid=\"widget_${id}\"\r\n\trole=\"combobox\"\r\n\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer'\r\n\t\tdojoAttachPoint=\"_buttonNode, _popupStateNode\" role=\"presentation\"\r\n\t\t><input class=\"dijitReset dijitInputField dijitArrowButtonInner\" value=\"&#9660; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t\t\t${_buttonInputDisabled}\r\n\t/></div\r\n\t><div class='dijitReset dijitValidationContainer'\r\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t/></div\r\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\r\n\t\t><input class='dijitReset dijitInputInner' ${!nameAttrSetting} type=\"text\" autocomplete=\"off\"\r\n\t\t\tdojoAttachPoint=\"textbox,focusNode\" role=\"textbox\" aria-haspopup=\"true\"\r\n\t/></div\r\n></div>\r\n"),hasDownArrow:true,openOnClick:true,regExpGen:_4.date.locale.regexp,datePackage:"dojo.date",compare:function(_7,_8){var _9=this._isInvalidDate(_7);var _a=this._isInvalidDate(_8);return _9?(_a?0:-1):(_a?1:_4.date.compare(_7,_8,this._selector));},forceWidth:true,format:function(_b,_c){if(!_b){return "";}return this.dateLocaleModule.format(_b,_c);},"parse":function(_d,_e){return this.dateLocaleModule.parse(_d,_e)||(this._isEmpty(_d)?null:undefined);},serialize:function(_f,_10){if(_f.toGregorian){_f=_f.toGregorian();}return _4.date.stamp.toISOString(_f,_10);},dropDownDefaultValue:new Date(),value:new Date(""),_blankValue:null,popupClass:"",_selector:"",constructor:function(_11){var _12=_11.datePackage?_11.datePackage+".Date":"Date";this.dateClassObj=_4.getObject(_12,false);this.value=new this.dateClassObj("");this.datePackage=_11.datePackage||this.datePackage;this.dateLocaleModule=_4.getObject(this.datePackage+".locale",false);this.regExpGen=this.dateLocaleModule.regexp;this._invalidDate=_5.form._DateTimeTextBox.prototype.value.toString();},buildRendering:function(){this.inherited(arguments);if(!this.hasDownArrow){this._buttonNode.style.display="none";}if(this.openOnClick||!this.hasDownArrow){this._buttonNode=this.domNode;this.baseClass+=" dijitComboBoxOpenOnClick";}},_setConstraintsAttr:function(_13){_13.selector=this._selector;_13.fullYear=true;var _14=_4.date.stamp.fromISOString;if(typeof _13.min=="string"){_13.min=_14(_13.min);}if(typeof _13.max=="string"){_13.max=_14(_13.max);}this.inherited(arguments);},_isInvalidDate:function(_15){return !_15||isNaN(_15)||typeof _15!="object"||_15.toString()==this._invalidDate;},_setValueAttr:function(_16,_17,_18){if(_16!==undefined){if(typeof _16=="string"){_16=_4.date.stamp.fromISOString(_16);}if(this._isInvalidDate(_16)){_16=null;}if(_16 instanceof Date&&!(this.dateClassObj instanceof Date)){_16=new this.dateClassObj(_16);}}this.inherited(arguments);if(this.dropDown){this.dropDown.set("value",_16,false);}},_set:function(_19,_1a){if(_19=="value"&&this.value instanceof Date&&this.compare(_1a,this.value)==0){return;}this.inherited(arguments);},_setDropDownDefaultValueAttr:function(val){if(this._isInvalidDate(val)){val=new this.dateClassObj();}this.dropDownDefaultValue=val;},openDropDown:function(_1b){if(this.dropDown){this.dropDown.destroy();}var _1c=_4.getObject(this.popupClass,false),_1d=this,_1e=this.get("value");this.dropDown=new _1c({onChange:function(_1f){_5.form._DateTimeTextBox.superclass._setValueAttr.call(_1d,_1f,true);},id:this.id+"_popup",dir:_1d.dir,lang:_1d.lang,value:_1e,currentFocus:!this._isInvalidDate(_1e)?_1e:this.dropDownDefaultValue,constraints:_1d.constraints,filterString:_1d.filterString,datePackage:_1d.datePackage,isDisabledDate:function(_20){return !_1d.rangeCheck(_20,_1d.constraints);}});this.inherited(arguments);},_getDisplayedValueAttr:function(){return this.textbox.value;},_setDisplayedValueAttr:function(_21,_22){this._setValueAttr(this.parse(_21,this.constraints),_22,_21);}});}}};});