dijit/form/_DateTimeTextBox.__Constraints (version 1.10)

Summary

Specifies both the rules on valid/invalid values (first/last date/time allowed), and also formatting options for how the date/time is displayed.

Note: This is not a real constructor, but just a description of the type of object that should be passed as a parameter to some method(s), and/or the return value from some method(s). In other words, the type exists only for documentation purposes, and you cannot call new _DateTimeTextBox.__Constraints()

See the dijit/form/_DateTimeTextBox.__Constraints reference documentation for more information.

Examples

Example 1

To restrict to dates within 2004, displayed in a long format like "December 25, 2005":

{min:'2004-01-01',max:'2004-12-31', formatLength:'long'}

Property Summary

  • amoverride strings for am in times
  • datePatternoverride pattern with this string
  • formatLengthchoice of long, short, medium or full (plus any custom additions).
  • fullYear(format only) use 4 digit years whenever 2 digit years are called for
  • localeoverride the locale used to determine formatting rules
  • maxMaximum signed value.
  • minMinimum signed value.
  • pmoverride strings for pm in times
  • selectorchoice of 'time','date' (default: date and time)
  • strict(parse only) strict parsing, off by default
  • timePatternoverride pattern with this string

Properties

am
Defined by: dojo/date/locale

override strings for am in times

datePattern
Defined by: dojo/date/locale

override pattern with this string

formatLength
Defined by: dojo/date/locale

choice of long, short, medium or full (plus any custom additions). Defaults to 'short'

fullYear
Defined by: dojo/date/locale

(format only) use 4 digit years whenever 2 digit years are called for

locale
Defined by: dojo/date/locale

override the locale used to determine formatting rules

max

Maximum signed value. Default is +Infinity

min

Minimum signed value. Default is -Infinity

pm
Defined by: dojo/date/locale

override strings for pm in times

selector
Defined by: dojo/date/locale

choice of 'time','date' (default: date and time)

strict
Defined by: dojo/date/locale

(parse only) strict parsing, off by default

timePattern
Defined by: dojo/date/locale

override pattern with this string

Error in the documentation? Can’t find what you are looking for? Let us know!