Prodular UI

Time picker

A time field that understands what people type, offers a list of times at a fixed step and follows the locale's 12 or 24 hour clock.

npx prodular-ui add time-picker

Start and end

15 minute steps between 7 AM and 8 PM. The end is checked against the start.

Month end review with Kestrel Health, 45 minutes.

24 hour clock

The locale decides the clock. Arrow keys step by 30 minutes while the list is closed.

Uses 24 hour time from the en-GB locale. Type 1830, 6:30 pm or use the arrow keys to step by 30 minutes.

Anatomy

<Field>  <FieldLabel>Starts</FieldLabel>  <TimePicker value={start} onValueChange={setStart} step={15} min="07:00" max="20:00" /></Field>

Guidance

Use it when

  • Picking a time of day: meetings, schedules, cut-offs, reminders.
  • step to match how precise the time needs to be: 15 or 30 minutes for meetings, 5 for reminders.

Avoid

  • Durations like 45 minutes. Use Number input with a unit.
  • A time that always comes with a date. Put a Calendar and the Time picker side by side in one Field group.

Rules for AI agents

Published in llms-full.txt, the registry and the MCP server, so coding agents follow them when they build with this component.

  • Store and pass the value as 24 hour "HH:mm". Only the display follows the locale.
  • Pass the user's locale, and hourCycle only when the product overrides it.
  • Set min and max for business hours; typed times outside them are marked invalid instead of being clamped silently.
  • For a start and end pair, check end after start yourself and show the message in FieldDescription with aria-invalid on the end field.
  • Time zones are not part of the value. Show the zone next to the field when it is not the user's own.

API

TimePicker

PropTypeDefaultDescription
value / defaultValue / onValueChangestring | null24 hour "HH:mm". Null when empty.
stepnumber15Minutes between listed times, and the arrow key step.
min / max"HH:mm""00:00" / "23:59"The range offered and accepted.
hourCycle12 | 24Defaults to the locale.
localestringFormats the display, for example en-US or en-GB.
namestringRenders a hidden input with the HH:mm value for form posts.

parseTime

PropTypeDefaultDescription
(text, hourCycle)number | nullThe parser the field uses, returning minutes after midnight.

Installation

The Prodular UI CLI adds the source to components/ui with everything it depends on. In a project that already uses shadcn/ui, the shadcn CLI installs it from the Prodular registry too. See Installation for the first setup.

npx prodular-ui add time-picker# or, with the registry in components.jsonnpx shadcn@latest add @prodular/time-picker