sandstone/ Time Picker
Provides a Sandstone-themed time selection component.
import TimePicker from '@enact/sandstone/TimePicker';Members
TimePickerComponent
A component that allows displaying or selecting time.
Set the value property to a standard JavaScript Date object to initialize the picker.
By default, TimePicker 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.
import TimePicker from '@enact/sandstone/TimePicker';Properties
Default value
The selected date.
TimePickerBaseComponent
sandstone/TimePicker.TimePickerBase is the stateless functional time picker component. Should not be used directly but may be composed within another component as it is within sandstone/TimePicker.TimePicker.
import {TimePickerBase} from '@enact/sandstone/TimePicker';Properties
The
hourcomponent of the time.The
meridiemcomponent of the time.Array of meridiem labels to display.
The
minutecomponent of the time.The order in which the component pickers are displayed.
Should be an array of 2 or 3 strings containing one of
'h','k','m', and'a'.Disables voice control.
Disables the
TimePicker.The "aria-label" for the hour picker
If not specified, the "aria-label" for the hour picker will be a combination of the current value and 'hour change a value with up down button'.
The primary text of
TimePicker.The "aria-label" for the meridiem picker.
If not specified, the "aria-label" for the meridiem picker will be a combination of the current value and 'change a value with up down button'.
The hint string read when focusing the meridiem picker.
The "aria-label" for the minute picker.
If not specified, the "aria-label" for the minute picker will be a combination of the current value and 'minute change a value with up down button'.
Hides the label that displays the time.
Called on changes in the
hourcomponent of the time.Called on changes in the
meridiemcomponent of the time.Called on changes in the
minutecomponent of the time.Called when
Enterkey down on the last pickerCalled when the component is removed while retaining focus.
Called when the focus leaves the picker when the 5-way left key is pressed.
Called when the focus leaves the picker when the 5-way right key is pressed.
Disables spotlight navigation into the component.
Default: false
timeToLocaleStringFunction
timeToLocaleString( time )String|nullConverts a standard Date object into a locale-specific string.
1 Param
- time Date
Dateto convert
Returns
- Stringnull
Converted date or
nullifdateis invalid