dojox/mobile/_DatePickerMixin (version 1.10)

Summary

A mixin for date picker widget.

See the dojox/mobile/_DatePickerMixin reference documentation for more information.

Property Summary

Method Summary

  • _disableEndDaysOfMonth() Disables the end days of the month to match the specified number of days of the month.
  • _getDateAttr() Returns a Date object for the current values.
  • _getValueAttr() Gets the current date as a String formatted according to a subset of the ISO-8601 standard.
  • _setValueAttr(value) Sets the current date as an String formatted according to a subset of the ISO-8601 standard.
  • _setValuesAttr(values) Sets the current date as an array of values.
  • initSlots() Initializes the slots.
  • reorderSlots() Reorders the slots.
  • reset() Goes to today.

Event Summary

  • _onDaySet() An internal handler called when the day value is changed.
  • _onMonthSet() An internal handler called when the month value is changed.
  • _onYearSet() An internal handler called when the year value is changed.
  • onDaySet() A handler called when the day value is changed.
  • onMonthSet() A handler called when the month value is changed.
  • onYearSet() A handler called when the year value is changed.

Properties

dayPattern

A pattern to be used to format day.

monthPattern

A pattern to be used to format month.

value

A string representing the date value. The setter of this property first converts the value argument by calling the fromISOString method of the dojo/date/stamp module, then sets the values of the picker according to the resulting Date object. If the string cannot be parsed by fromISOString, the method does nothing. Example: set("value", "2012-1-20"); // January 20, 2012 The getter returns the string formatted as described in the dojo/date/stamp module.

yearPattern

A pattern to be used to format year.

Methods

_disableEndDaysOfMonth()

Disables the end days of the month to match the specified number of days of the month. Returns true if the day value is changed.

Returns:boolean
_getDateAttr()

Returns a Date object for the current values.

Returns:undefined
_getValueAttr()

Gets the current date as a String formatted according to a subset of the ISO-8601 standard.

Returns:String | undefined

A string formatted as described in the dojo/date/stamp module.

_setValueAttr(value)

Sets the current date as an String formatted according to a subset of the ISO-8601 standard.

This method first converts the value argument by calling the fromISOString method of the dojo/date/stamp module, then sets the values of the picker according to the resulting Date object. If the string cannot be parsed by fromISOString, the method does nothing.

Parameter Type Description
value String

A string formatted as described in the dojo/date/stamp module.

Examples

Example 1

set("value", "2012-1-20"); // January 20, 2012
_setValuesAttr(values)

Sets the current date as an array of values.

This method takes an array that consists of three values, year, month, and day. If the values are integer, they are formatted to locale-specific strings before setting them to the slots. Month starts from 1 to 12 (Ex. 1 - Jan, 2 - Feb, etc.) If the values are NOT integer, they are directly passed to the setter of the slots without formatting.

Parameter Type Description
values Array

Examples

Example 1

set("values", [2012, 1, 20]); // January 20, 2012
initSlots()

Initializes the slots.

reorderSlots()

Reorders the slots.

reset()

Goes to today.

Events

_onDaySet()

An internal handler called when the day value is changed.

Examples

Example 1

set("values", [2012, 1, 20]); // January 20, 2012
_onMonthSet()

An internal handler called when the month value is changed.

Examples

Example 1

set("values", [2012, 1, 20]); // January 20, 2012
_onYearSet()

An internal handler called when the year value is changed.

Examples

Example 1

set("values", [2012, 1, 20]); // January 20, 2012
onDaySet()

A handler called when the day value is changed.

Examples

Example 1

set("values", [2012, 1, 20]); // January 20, 2012
onMonthSet()

A handler called when the month value is changed.

Examples

Example 1

set("values", [2012, 1, 20]); // January 20, 2012
onYearSet()

A handler called when the year value is changed.

Examples

Example 1

set("values", [2012, 1, 20]); // January 20, 2012
Error in the documentation? Can’t find what you are looking for? Let us know!