fillInTemplate: function(args, frag){ // summary: see dojo.widget.DomWidget dojo.widget.DropdownDatePicker.superclass.fillInTemplate.call(this, args, frag); //attributes to be passed on to DatePicker var dpArgs = {widgetContainerId: this.widgetId, lang: this.lang, value: this.value, startDate: this.startDate, endDate: this.endDate, displayWeeks: this.displayWeeks, weekStartsOn: this.weekStartsOn, adjustWeeks: this.adjustWeeks, staticDisplay: this.staticDisplay}; //build the args for DatePicker based on the public attributes of DropdownDatePicker this.datePicker = dojo.widget.createWidget("DatePicker", dpArgs, this.containerNode, "child"); //dojo.event.connect(this.datePicker, "onValueChanged", this, "onSetDate"); this.inputNode.style.display="none"; //dojo.date.format(d, {selector:'dateOnly', formatLength:'short'}); var me = this; var setter = function(value) { dojo.byId(me.inputNode.extraArgs["thisID"]).value = dojo.date.format(value, {formatLength:'short', datePattern: 'MM/dd/yyyy', selector:'dateOnly', locale:this.lang}); } dojo.event.connect(this.datePicker, "onValueChanged", setter ); if(this.value){ this.onSetDate(); } this.containerNode.style.zIndex = this.zIndex; this.containerNode.explodeClassName = "calendarBodyContainer"; this.valueNode.name=this.name; },