TimePicker

Hours + minutes (and optional seconds) input. 24-hour or 12-hour formats with an AM/PM toggle, ↑/↓ on the minute field steps by your chosen granularity. Value is always emitted as a 24-hour HH:MM string regardless of display format.

24-hour · 5-minute steps
:

value = 14:30

12-hour · with seconds
::

value = 09:15

Usage

import { TimePicker } from '@bwo-ui/react';

const [time, setTime] = useState('14:30');

<TimePicker value={time} onValueChange={setTime} step={5} />

// 12-hour with seconds
<TimePicker format="12h" withSeconds value={time} onValueChange={setTime} />

Props

PropTypeDefaultDescription
valuestringControlled 24-hour HH:MM string.
defaultValuestring'12:00'Uncontrolled default.
onValueChange(value: string) => voidFires with the new HH:MM (24-hour) string.
withSecondsbooleanfalseAdd a seconds slot.
format'24h' | '12h''24h'Display format.
stepnumber1Step in minutes for arrow-key changes on the minute field.