DropDownDatePicker has been replaced by dijit.form.DateTextBox. The API and functionality have been simplified, and the widget is now fully accessible, globalized, and skinnable. DateTextBox is a subclass of dijit.form.ValidationTextbox and behaves like other subclasses of that widget. It is intended to be used in forms. The date is now always submitted to the server using a profile of ISO8601 -- see dojo.date.stamp for details.
| Dojo 0.4 | Dojo 0.9 | Notes |
|---|---|---|
| iconURL | deleted | presentation of dropdown is customizable via CSS theming instead |
| formatLength | deleted | use constraints.formatLength instead |
| displayFormat | use constraints.datePattern + selector | |
| saveFormat | deleted | No longer a choice. See dojo.date.stamp for specifications |
| value | value | now contains a Javascript Date object only |
| displayWeeks, adjustWeeks | deleted | no longer customizable |
| startDate/endDate | deleted | use constraints.min/max instead |
| weekStartsOn | deleted | must use locale default |
| staticDisplay | deleted | no longer an option |
| Dojo 0.4 | Dojo 0.9 | Notes |
|---|---|---|
| getDate() | use value attribute instead | |
| getValue() | use serialize instead | |
| setValue()/setDate() | use Date object for argument only | |
| onValueChanged(), onInputChange() | use onChange instead -- see dijit.form._FormWidget |
Besides the changes made to ValidationTextbox, the biggest change to the DateTextBox API is the universal value format. Listings 1 and 2 demonstrate the new 0.9 date syntax:
<input type="text" name="date1" class="medium" value="12/30/05" lang="en-us" dojoType="DateTextBox" required="true" invalidMessage="Invalid date. Use M/d/yy format." />
<input id="q14b" type="text" name="date1" value="2005-12-30" dojoType="dijit.form.DateTextBox" lang="en-us" required="true" promptMessage="mm/dd/yyyy" invalidMessage="Invalid date. Use mm/dd/yyyy format." />
DatePicker has been replaced by dijit._Calendar but this widget is not meant to be used standalone because it does not provide accessibility to the visually or mobility impaired individual. Using the widget standalone is not currently supported because of this restriction. To provide access for all users, it is recommended that dijit.form.DateTextBox be used for input of dates.