Time picker
Choose a time from a list at set intervals, by typing hours and minutes, or on a clock face in a popover.
// Plain markup
import { TimePicker, TimePickerClock, TimePickerInput } from "@shavin/ui";TimePicker
Component Source
<TimePicker value={time} onChange={setTime} intervalMinutes={30} />TimePickerInput
Component Source
<TimePickerInput value={time} onChange={setTime} />TimePickerClock
Component Source
<TimePickerClock value={time} onChange={setTime} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value* | Date | — | Currently selected Date object. |
| onChange* | (d: Date) => void | — | Callback fired when selected time changes. |
| ariaLabel | string | — | Screen reader label for accessibility. |
| intervalMinutes | number | 30 | Minutes between each option in select dropdown — 15, 30, 60, etc. Default 30. |
| id | string | — | id of the group, so FormField can point at it. |
* required