AUI.add("aui-datepicker-base",function(D){var G=D.Lang,C=G.isBoolean,B=G.isFunction,M="calendar",K="contentBox",J="currentNode",E="formatter",F="selectMultipleDates",L="setValue",I="date-picker";var H=D.Component.create({NAME:I,ATTRS:{calendar:{setter:"_setCalendar",value:{}},formatter:{value:function(A){return A.formatted.join(",");},validator:B},setValue:{value:true,validator:C},stack:{lazyAdd:false,value:true,setter:"_setStack",validator:C},showOn:{value:"mousedown"},hideOn:{value:"mousedown"}},EXTENDS:D.OverlayContext,prototype:{initializer:function(){var A=this;A.calendar=new D.Calendar(A.get(M));},bindUI:function(){var A=this;H.superclass.bindUI.apply(this,arguments);A.on("show",A._onShowOverlay);A.after("calendar:select",A._afterSelectDate);if(A.get(L)){A._setTriggerValue(A.calendar._getSelectEventData().date);}},destructor:function(){var A=this;A.calendar.destroy();},_afterSelectDate:function(N){var A=this;if(!A.calendar.get(F)){A.hide();}if(A.get(L)){A._setTriggerValue(N.date);}},_onShowOverlay:function(N){var A=this;A._renderCalendar();},_renderCalendar:function(){var A=this;A.calendar.render(A.get(K));},_setCalendar:function(N){var A=this;D.mix(N,{bubbleTargets:A});return N;},_setStack:function(N){var A=this;if(N){D.DatepickerManager.register(A);}else{D.DatepickerManager.remove(A);}return N;},_setTriggerValue:function(N){var A=this;var O=A.get(E).apply(A,[N]);A.get(J).val(O);}}});D.DatePicker=H;D.DatepickerManager=new D.OverlayManager({zIndexBase:1000});},"1.0.1",{skinnable:true,requires:["aui-calendar","aui-overlay-context"]});