Overview
TimePicker edits a start and end time that share one value. Each time field is a combobox: type a time, or open a 15-minute list.
- Typed times —
930 is 9:30 AM, 6p is 6:00 PM. Without am/pm the number is read as 24-hour time, so 18 is 6:00 PM and 6 is 6:00 AM
- Within a day — the end is always at or after the start and less than a day later. An end earlier than the start falls on the next day and shows
+1 day
- Start edits keep the end — changing the start never moves the end time
- No rounding —
9:07 is saved as 9:07. Only the list uses 15-minute steps
- Date —
TimePicker.Date opens a DatePicker. Picking a day moves start and end together and keeps both times
Basic Usage
Crossing Midnight
Recording
An empty end means the log is still recording. The end field shows its placeholder, and editing the start keeps the end empty.
Typing a Time
| You type | Saved as |
|---|
6, 06 | 6:00 AM |
18, 6p, 6pm | 6:00 PM |
930, 9:30, 930a | 9:30 AM |
930p, 9:30 PM, 2130 | 9:30 PM |
12, 12p | 12:00 PM |
0, 12a | 12:00 AM |
9:07 | 9:07 AM |
abc, 24, 13pm | Not saved: error |
Press Enter or leave the field to save. Escape discards what you typed. An unreadable time shows the error only after Enter, so it does not flash while you type. Leaving the field then restores the previous value. Clearing the end and pressing Enter empties the end; the start cannot be emptied.
Sub-components
TimePicker (Root)
| Prop | Type | Default | Required | Description |
|---|
value | TimePickerValue | - | Yes | { start, end } as ISO strings or null. An empty end means recording |
onChange | (value: TimePickerValue) => void | - | Yes | Called only when the value really changes. The end always stays within a day after the start |
children | ReactNode | - | Yes | Date, Range, Input (field="start" | "end"), Separator, DayOffset |
TimePicker.Date
| Prop | Type | Default | Required | Description |
|---|
placeholder | string | 'Date' | No | Text shown when there is no value |
aria-label | string | 'Date' | No | Accessible name. The full date is appended when set |
className | string | - | No | Extra CSS class |
| Prop | Type | Default | Required | Description |
|---|
field | 'start' | 'end' | - | Yes | Which end of the range this field edits |
placeholder | string | - | No | Text shown when empty. Defaults to Start / End |
aria-label | string | - | No | Accessible name. Defaults to Start time / End time |
className | string | - | No | Extra CSS class |
TimePicker.Range
Lays out the fields, the separator and the day offset in a row.
| Prop | Type | Default | Required | Description |
|---|
children | ReactNode | - | No | Inputs, Separator and DayOffset |
className | string | - | No | Extra CSS class |
style | CSSProperties | - | No | Inline style |
TimePicker.Separator
| Prop | Type | Default | Required | Description |
|---|
children | ReactNode | '–' | No | Separator content |
className | string | - | No | Extra CSS class |
style | CSSProperties | - | No | Inline style |
TimePicker.DayOffset
| Prop | Type | Default | Required | Description |
|---|
className | string | - | No | Extra CSS class |
Specification
base
| 상태 | 요소 | 속성 | 값 |
|---|
| enabled | input | paddingX | $size.space.300 |
| enabled | input | paddingY | $size.space.150 |
| enabled | input | borderRadius | $size.radius.200 |
| enabled | input | borderWidth | $size.stroke.border |
| enabled | input | borderColor | $color.border.default.default |
| enabled | input | backgroundColor | $color.background.default.default |
| enabled | input | typography | $text.bodySmall |
| enabled | input | color | $color.text.default.default |
| enabled | list | padding | $size.space.100 |
| enabled | list | borderRadius | $size.radius.200 |
| enabled | list | borderWidth | $size.stroke.border |
| enabled | list | borderColor | $color.border.default.default |
| enabled | list | backgroundColor | $color.background.default.default |
| enabled | list | minWidth | 180px토큰 아님 — no sizing token scale; matches Figma Time List |
| enabled | option | paddingY | $size.space.150 |
| enabled | option | borderRadius | $size.radius.100 |
| enabled | option | gap | $size.space.200 |
| enabled | option | typography | $text.bodySmall |
| enabled | option | color | $color.text.default.default |
| enabled | error | typography | $text.caption |
| enabled | error | color | $color.text.danger.default |
| enabled | separator | typography | $text.bodySmall |
| enabled | separator | color | $color.text.default.secondary |
| enabled | dayOffset | paddingX | $size.space.200 |
| enabled | dayOffset | paddingY | $size.space.100 |
| enabled | dayOffset | borderRadius | $size.radius.100 |
| enabled | dayOffset | typography | $text.captionStrong |
| enabled | dayOffset | backgroundColor | $color.background.tag.gray |
| enabled | dayOffset | color | $color.text.tag.gray |
| hover | input | backgroundColor | $color.background.default.defaultHover |
| hover | option | backgroundColor | $color.background.default.defaultHover |
| focus | input | strokeWidth | $size.stroke.focus |
| focus | input | strokeColor | $color.border.brand.default |
| focus | input | outlineStyle | none토큰 아님 — the border shows focus instead |
| invalid | input | borderColor | $color.border.danger.default |
Accessibility
- Each time field is a combobox named Start time or End time. Focus stays in the field; the list position is announced with
aria-activedescendant.
- Keys: Down or Alt+Down opens the list, Up and Down move, Enter picks, Escape closes and discards the typed text, Tab saves and moves on.
- The error text and the
+1 day chip are linked to the field with aria-describedby.
Guidelines
- Pass
value as ISO strings, or null for an empty end.
onChange is called only when the value really changes, so tabbing through the fields does not save anything.