DateTextBox.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. define("dijit/form/DateTextBox", [
  2. "dojo/_base/declare", // declare
  3. "../Calendar",
  4. "./_DateTimeTextBox"
  5. ], function(declare, Calendar, _DateTimeTextBox){
  6. /*=====
  7. var Calendar = dijit.Calendar;
  8. var _DateTimeTextBox = dijit.form._DateTimeTextBox;
  9. =====*/
  10. // module:
  11. // dijit/form/DateTextBox
  12. // summary:
  13. // A validating, serializable, range-bound date text box with a drop down calendar
  14. return declare("dijit.form.DateTextBox", _DateTimeTextBox, {
  15. // summary:
  16. // A validating, serializable, range-bound date text box with a drop down calendar
  17. //
  18. // Example:
  19. // | new dijit.form.DateTextBox({value: new Date(2009, 0, 20)})
  20. //
  21. // Example:
  22. // | <input data-dojo-type='dijit.form.DateTextBox' value='2009-01-20'>
  23. baseClass: "dijitTextBox dijitComboBox dijitDateTextBox",
  24. popupClass: Calendar,
  25. _selector: "date",
  26. // value: Date
  27. // The value of this widget as a JavaScript Date object, with only year/month/day specified.
  28. // If specified in markup, use the format specified in `stamp.fromISOString`.
  29. // set("value", ...) accepts either a Date object or a string.
  30. value: new Date("") // value.toString()="NaN"
  31. });
  32. });