Skip to main content

value

Description

sets the value of a time picker

Type

Date object

Default

new Date(0, 0, 0, 0, 0);

Example

<!-- shows the current time -->
<TimePicker value={new Date()} />

<!-- shows the specified hour and minutes -->
<TimePicker value={new Date(2023, 3, 16, 12, 12)} />

<!-- shows the midnight time of the specified date -->
<TimePicker value={new Date(2023, 3, 16)} />

Details

note

Note that if you provide a date with no time specified, e.g. new Date(2023, 3, 16), the midnight time will be shown.

Related article: Setting the value

Related sample: TimePicker