TimePicker
v1.0.8Updated 27 Aug 2026Time field with free-text parsing plus a popover digital-clock panel (composes MultiSectionDigitalClock). Type "9:30", "1:45 pm" or "18:20:05" and it parses/validates live — invalid or out-of-range text shows the error s
Preview
Live · 11 stories▸Why this is recommendedtimepickerinputfield+5
The default, out-of-the-box TimePicker.
- ✓Opening / closing hours fields
- ✓Appointment and delivery-slot times
- ✓Shift start / end fields in rosters
- ✓Any form needing a typed + picked time
- Free typing with lenient parsing ("9.30", "1:45 pm", "18:20:05")
- Live validation — invalid / out-of-range text shows the error ring, valid input commits immediately
- Popover panel composes MultiSectionDigitalClock (hours | minutes | seconds | AM-PM listboxes)
- Controlled (value / onValueChange) + uncontrolled (defaultValue)
- Canonical 24-hour value (HH:mm, or HH:mm:ss with withSeconds); null when cleared
- 12-hour display (hour12) while still emitting 24-hour values
- minTime / maxTime range — typed values validate, panel picks and stepping clamp into range
- minuteStep granularity for the minutes listbox and arrow stepping
- Keyboard: ArrowUp/Down step minutes, PageUp/Down step hours, Alt+ArrowDown opens the panel, arrows also step the focused panel column
- Sizes sm / md / lg, clearable ×, disabled and error states
- Hidden input carries the canonical value when name is set (form posts)
- i18n: labels prop overrides clear/trigger aria-labels and the 12-hour AM/PM display strings
- ✕Picking from a single preset slot list (use DigitalClock)
- ✕Analog-style picking (use TimeClock)
- ✕Combined date + time (use DateTimePicker)
Install
Ask your agent, or call the MCP tool directly. The resolved bundle is written into your project.
Usage
Tick variants in the left menu — each adds a tab with that variant’s real story source, the same code the preview above renders.
Props
valueControlled canonical value 'HH:mm' / 'HH:mm:ss'; null or '' = empty
—defaultValueUncontrolled initial value
—onValueChangeFired with the canonical 24-hour string, or null when cleared
—hour1212-hour AM/PM display + panel (emitted value stays 24-hour)
—minTimeEarliest allowed time-of-day, e.g. '08:00'
—maxTimeLatest allowed time-of-day, e.g. '20:30'
—minuteStepMinutes listbox / arrow-stepping granularity (default 1)
—withSecondsAdds a seconds column and emits 'HH:mm:ss'
—disabledDisable the field
—errorForce the error appearance regardless of parse state
—sizeField size (default md)
—clearableShow a clear (×) button when a value is set
—placeholderDefaults to the active format mask (HH:mm, hh:mm AM, …)
—nameRenders a hidden input with the canonical value for form posts
—alignPopover alignment relative to the field
—labelsOverride built-in UI strings (i18n)
—