Time Picker
stableA MUI-style time field with a 12-hour analog clock panel.
Basic usage
Examples
24-hour with step
Use 24-hour mode and snap minutes to 30-minute intervals.
MUI-style time field
Use the 12-hour analog clock panel with AM/PM, minutesStep, minTime, maxTime and shouldDisableTime.
12-hour analog clock with 15-minute steps between 8:00 AM and 6:00 PM.
Seconds use a separate 1-60 clock selector.
Time segments
Use segments for hour, minute and second editing with keyboard support.
Features
- 1-12 hour clock.
- AM/PM and seconds selection.
- Min/max time validation.
Installation
pnpm dlx structyl add time-pickerAPI Reference
TimePicker
MUI-style time field with a 12-hour analog clock panel, AM/PM selection and segmented primitive parts.
| Prop | Type | Default |
|---|---|---|
| value / defaultValue | Date | TimeValue | nullControlled or uncontrolled time. | — |
| onChange / onAccept | (value, context) => voidMUI-style callbacks with validation context. | — |
| ampm / ampmInClock | boolean12-hour AM/PM mode is enabled by default in the styled picker. | — |
| minTime / maxTime / disablePast / disableFuture | Date / booleanTime validation bounds. | — |
| minutesStep / timeSteps | number / { hours, minutes, seconds }Clock number stepping, including optional seconds clock selection. | — |
| shouldDisableTime / skipDisabled | (value, view) => booleanDisable or hide specific clock values. | — |
| views / view / openTo / onViewChange | Array<'hours' | 'minutes' | 'seconds'>MUI-compatible time view props. | — |
| format / formatDensity / selectedSections | MUI field propsFormatting and field section props. | — |
| disableOpenPicker / disabled / readOnly / autoFocus | booleanInteraction and field state props. | — |
| slots / slotProps / sx / viewRenderers / timezone | object / stringMUI customization and timezone compatibility props. | — |
TimePicker.Root
Compound segmented time input.
| Prop | Type | Default |
|---|---|---|
| value | Date | TimeValue | nullControlled time. | — |
| onValueChange | (value: TimeValue) => voidStructyl-style segment callback. | — |
TimePicker.Panel
Analog clock panel used by the styled TimePicker and DateTimePicker time step.
| Prop | Type | Default |
|---|---|---|
| onAccept / onCancel | callbacksAction button callbacks. | — |
TimePicker.Segment
An editable hour / minute / second segment.
| Prop | Type | Default |
|---|---|---|
| segment | 'hour' | 'minute' | 'second' | 'period'Which unit this segment edits. | — |