Shadcn Time Picker: Columns, Typed Input, Steps and Bounds
Browse 13 shadcn time picker components with hour, minute, second and AM/PM columns, a typable input, minute steps, min and max bounds and localized labels.
Shadcn Time Picker: Pick, Type and Limit a Time of Day
ReUI Time Picker is a custom shadcn component for choosing a time of day from scrollable hour, minute, second and AM/PM columns, in a popover or in place. It is not part of the base shadcn/ui library, and it is built on the shadcn Button, Input Group and Popover with no date library.
The value is a string in the format a native time input uses, HH:mm or HH:mm:ss in 24-hour time, whatever the picker shows on screen. A 12-hour clock with AM/PM is only a display setting, so a form, an API and a database always receive 14:30 rather than 2:30 PM.
The examples cover the places a time picker actually lands: appointment slots with booked times disabled, opening hours on 15-minute steps, and a meeting start and end. Others confirm a shift change with OK, validate a required form field, and show labels in 4 languages including right-to-left Arabic.
What is Shadcn Time Picker?
A time picker turns a time of day into a value you can store without parsing free text: each unit is a column, and a pick in one column keeps the others where it can. Shadcn Time Picker is 12 composable parts and a useTimePicker hook. With no children the root renders an outline trigger and a popover, TimePickerPanel inside it gives an always-open picker, and TimePickerInput gives a field people can type into.
Columns follow the granularity and the clock: hour only, hour and minute, or hour, minute and second, plus an AM/PM column on a 12-hour clock. Steps thin each column, so a 15-minute step shows 00, 15, 30 and 45, and each list of 5 rows centers its selected row.
Steps, bounds and unavailable times
min and max are inclusive, and a min later than max is an overnight window, so a night shift can run from 22:00 to 02:00. isTimeDisabled marks single times unavailable, such as a lunch hour or booked slots, and an hour with nothing left to pick is disabled in its column.
Every route in respects them. A column pick lands on the nearest selectable time, a tie going to the earlier one, a typed time outside the bounds or marked unavailable moves to the nearest one that is not, and Now floors the clock to the steps, so 14:38 on a 15-minute step becomes 14:30. A value you set in code through value or setValue is kept as given.
Shadcn Time Picker Features
- Scrollable listbox columns. Each unit is a listbox. Arrow keys, Home, End, Page Up and Page Down move the selection, Left and Right switch columns, and typing 1 then 4 within a second jumps to 14.
- Typable input. TimePickerInput reads 930, 14:30, 14h30, 2:30 pm and 2p, plus full-width, Arabic-Indic and Persian digits, on blur or Enter. Up and Down step to the next or previous free time.
- Steps, bounds and blocked times. hourStep, minuteStep and secondStep thin the columns, min and max set the window, overnight included, and isTimeDisabled greys out single times.
- 12 or 24-hour clock. hourCycle switches the display and periodPosition puts AM/PM before the time for Chinese, Japanese and Korean. The value stays 24-hour either way.
- Confirm with OK. requireConfirm keeps picks, Now and Clear as a draft until OK, and closing the popover discards them, so a change applies once or not at all.
- Native form field. Give the root a name and the value submits with a plain form or a server action, with required, a form attribute, and a form reset that restores the default.
- Localized labels. 12 labels and 2 format functions cover the headers, AM and PM, the buttons, the placeholder, the accessible names and the digits. Override one key and the rest keep their defaults.
- Every shadcn style. Rows copy the shadcn Select item height and radius in all 8 styles, and a --time-picker-rows variable sets how many rows show, 5 by default.
Accessibility and right-to-left
Each column is a listbox named by its header, the selection follows the arrow keys like a native wheel, and every list is described by the full time, so a screen reader hears 14:30 and not just 30. Given aria-labelledby, the trigger's name joins your label and the current value, and Tab cycles inside the open popover until Escape or OK closes it.
Columns always run left to right, because a time reads hour first in right-to-left text too, and forced colors mode marks the selection with the system highlight. readOnly keeps the columns focusable so the value can still be read, while keys and clicks leave it unchanged.
Integrating With Other Components
Wrap the picker in Shadcn Field for a label, a description and an error, and pass the label's id as aria-labelledby so the trigger reads both the label and the value. TimePickerInput is built on Shadcn Input Group and the columns open in Shadcn Popover, so both follow your theme.
For a date and a time, place Shadcn Calendar and a TimePickerPanel side by side in one card, and keep Shadcn Date Selector for date ranges. For a start and an end, use 2 pickers and set the end's min from the start, which keeps the end after the start without validation code.
The Schedule blocks are the assembled version of the screens around a time, 10 Pro layouts including booking widgets, agendas and time-slot lists. The Time Picker docs list every part, prop and helper.
Schedule Blocks in ReUI Pro
The free examples above pair with 10 production ready schedule blocks in ReUI Pro, complete sections built on the same primitives and ready to copy into your app.
- Schedule (10 blocks)Calendar and scheduling components with day, week, and month views for event management.
Frequently Asked Questions
How is this different from a native input type=time?
How is it different from Date Selector, and how do I pick a date and a time?
Does it handle time zones?
How do I disable booked slots or a lunch break?
How do I send the time to my server?
Can I leave out Now or the OK button?
Is it safe to server render in Next.js?
Start building with ReUI Pro today.
Every Pro block, every style, and every future addition, with one license for unlimited projects.
From $249, once. Lifetime updates.