DateTextBox.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved.
  3. Available via Academic Free License >= 2.1 OR the modified BSD license.
  4. see: http://dojotoolkit.org/license for details
  5. */
  6. if(!dojo._hasResource["dijit.form.DateTextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
  7. dojo._hasResource["dijit.form.DateTextBox"] = true;
  8. dojo.provide("dijit.form.DateTextBox");
  9. dojo.require("dijit.Calendar");
  10. dojo.require("dijit.form._DateTimeTextBox");
  11. dojo.declare(
  12. "dijit.form.DateTextBox",
  13. dijit.form._DateTimeTextBox,
  14. {
  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 dojotype='dijit.form.DateTextBox' value='2009-01-20'>
  23. baseClass: "dijitTextBox dijitComboBox dijitDateTextBox",
  24. popupClass: "dijit.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 `dojo.date.stamp.fromISOString`.
  29. // set("value", ...) accepts either a Date object or a string.
  30. value: new Date("") // value.toString()="NaN"
  31. }
  32. );
  33. }