(function(){u8.Base.Widgets.DropDownDatePicker=function(e,t){t=$.extend({},u8.Base.Widgets.DropDownDatePicker.defaults,t);t.textAlign="center";this.DropDown(e,t);this._value=this.value||[];delete this.value;this.bind("Hide",this._onDropDownHide.bind(this))};u8.Base.Widgets.DropDownDatePicker.defaults={closeOnTab:false,datePicker:{}};$.extend(u8.Base.Widgets.DropDownDatePicker.prototype,{getValue:function(){return this._value},setValue:function(e){this._value=e;if(this._datePicker){this._datePicker.setValue(e)}},createContent:function(){var e=$.extend(true,{},u8.Base.Widgets.DatePicker.defaults.theme);e.css.element="";$.extend(this.datePicker,{parent:this._popup,onValueChange:this._onValueChange.bind(this),onCreate:function(e){this.setHeight(e.$(e.element).outerHeight());this._updateSizeAndPosition()}.bind(this),theme:e});var t=this.getContent();t.addClass("u8-datepicker-dropdown");this._datePicker=new u8.Base.Widgets.DatePicker(t,this.datePicker);this._datePicker.setValue(this._value,{withoutEvents:true})},_onValueChange:function(e,t){this._value=e.getValue();this.raise("ValueChange",t);if(this._input){this._input.focus()}else{this._element.focus()}},_onDropDownHide:function(){u8.services.popups.autoClose({reason:"close-descendants"})},"Popup.onAutoClose":function(e,t){if(e!=this._popup){t.stopPropagation=true}}});u8.Base.Widgets.DropDownDatePicker.makeClass({name:"DropDownDatePicker",deriveFrom:u8.Base.Widgets.DropDown,events:["ValueChange"]})})();