limestone/DatePicker
Date selection components and behaviors.
Loading Live Preview
Loading Live Preview
Members
Section titled “Members ”DatePicker Component
Section titled “DatePicker   Component ”A date selection component, ready to use in Limestone applications.
DatePicker may be used to select the year, month, and day. It uses a standard Date object for
its value which can be shared as the value for a
limestone/TimePickerlimestone/TimePicker.TimePicker to select both a date and time.
By default, DatePicker maintains the state of its value property. Supply the
defaultValue property to control its initial value. If you wish to directly control updates
to the component, supply a value to value at creation time and update it in response to
onChange events.
Usage:
<DatePicker
defaultValue={selectedDate}
onChange={handleChange}
/> Extends:
limestone/DatePickerlimestone/DatePicker.DatePickerBase
Wrapped with:
ui/Changeableui/Changeable.Changeable
Properties
defaultValue
Section titled “defaultValue”The initial value used when value is not set.
The selected date
DatePickerBase Component
Section titled “DatePickerBase   Component ”A date selection component.
This component is most often not used directly but may be composed within another component as it is within limestone/DatePickerlimestone/DatePicker.DatePicker.
Properties
Required Property • day
Section titled “Required Property • day”The day component of the Date.
The value should be a number between 1 and maxDays.
Required Property • maxDays
Section titled “Required Property • maxDays”The number of days in the month.
Required Property • maxMonths
Section titled “Required Property • maxMonths”The number of months in the year.
Required Property • month
Section titled “Required Property • month”The month component of the Date.
The value should be a number between 1 and maxMonths.
Required Property • order
Section titled “Required Property • order”The order in which the component pickers are displayed.
The value should be an array of 3 strings containing one of 'm', 'd', and 'y'.
Required Property • year
Section titled “Required Property • year”The year component of the Date.
data-webos-voice-disabled
Section titled “data-webos-voice-disabled”Disables voice control.
dayAriaLabel
Section titled “dayAriaLabel”The "aria-label" for the day picker.
If not specified, the "aria-label" for the day picker will be a combination of the current value and 'day change a value with up down button'.
disabled
Section titled “disabled”Disables the DatePicker.
The primary text of the DatePicker.
maxYear
Section titled “maxYear”The maximum selectable year value.
minYear
Section titled “minYear”The minimum selectable year value.
monthAriaLabel
Section titled “monthAriaLabel”The "aria-label" for the month picker.
If not specified, the "aria-label" for the month picker will be a combination of the current value and 'month change a value with up down button'.
noLabel
Section titled “noLabel”Hides the label that displays the date.
onChangeDate
Section titled “onChangeDate”Called when the date component of the Date changes.
onChangeMonth
Section titled “onChangeMonth”Called when the month component of the Date changes.
onChangeYear
Section titled “onChangeYear”Called when the year component of the Date changes.
onSpotlightDisappear
Section titled “onSpotlightDisappear”Called when the component is removed when it had focus.
onSpotlightLeft
Section titled “onSpotlightLeft”Called prior to focus leaving the picker when the 5-way left key is pressed.
onSpotlightRight
Section titled “onSpotlightRight”Called prior to focus leaving the picker when the 5-way right key is pressed.
spotlightDisabled
Section titled “spotlightDisabled”Disables 5-way spotlight from navigating into the component.
Default: falseyearAriaLabel
Section titled “yearAriaLabel”The "aria-label" for the year picker.
If not specified, the "aria-label" for the year picker will be a combination of the current value and 'year change a value with up down button'.
onComplete
Section titled “onComplete”Called when Enter key down on the last picker
dateToLocaleString Function
Section titled “dateToLocaleString   Function ”dateToLocaleString( date ) → String | anyConverts a standard Date object into a locale-specific string.
1 Param
- date Date
Dateto convert
Returns
- String | any
Converted date or
nullifdateis invalid