Examples

Preset time intervals

Preview
9
30
AM
Example.tsx
import { Time, TimePicker } from '@reactloom/dates';

export default function Example() {
  return <TimePicker label="Meeting time" defaultValue={new Time(9, 30)} step={30} />;
}

API reference

TimePicker props
PropTypeDefault
value · defaultValue
Controlled or initial time value.
TimeValue | null—
onValueChange
Called when the time changes.
(value: TimeValue | null) => void—
step
Interval in minutes between preset options.
number30
granularity
Smallest editable time unit.
'hour' | 'minute' | 'second''minute'
hourCycle
Override the locale 12- or 24-hour clock.
12 | 24—

Keyboard interaction

Keyboard interactions
KeyAction
ArrowUp / ArrowDownIncrement or decrement the focused time segment
TabMove between hour, minute, and period segments

Usage guidelines

Do

  • Use step={15} or step={30} for scheduling forms.

Don’t

  • Do not force 24-hour format unless your users expect it regardless of locale.