Skip to content

Time Picker ​

An accessible, keyboard-navigable time picker with a scrollable clock dropdown. Supports 12/24-hour display formats, configurable minute steps, min/max bounds, and native form association.

Basic Usage ​

Full width

Listen for the change event to react to selections:

js
document.querySelector('ore-time-picker').addEventListener('change', (e) => {
  console.log(e.currentTarget.value); // '09:30'
});

Pre-selected Value ​

Set value to an HH:MM (24-hour) string to initialise the selection.

Full width

12-Hour Format ​

Use time-format="12" to show an AM/PM period column. The change event still emits a 24-hour HH:MM value.

Full width

Minute Step ​

Control the minute increment with minute-step. Common values: 1, 5, 10, 15, 30.

Full width

Min / Max Bounds ​

Restrict the selectable range with min and max in HH:MM format. Out-of-range options are disabled.

Full width

Form Integration ​

ore-time-picker is form-associated. The submitted value is the 24-hour HH:MM string, or an empty string when nothing is selected.

Full width

Sizes ​

Full width

Variants ​

Full width

Colors ​

Full width

Error and Helper Text ​

Full width

Disabled ​

Full width

API ​

Props ​

PropTypeDefaultDescription
valuestringN/ASelected time in 24-hour HH:MM format
minstringN/AMinimum selectable time (HH:MM, inclusive)
maxstringN/AMaximum selectable time (HH:MM, inclusive)
time-format'12' | '24''24'Display format; '12' adds an AM/PM column
minute-stepnumber5Minute increment (1–59)
labelstringN/AVisible label
label-placement'inset' | 'outside''inset'Label position
placeholderstringN/ATrigger placeholder when no time is selected
namestringN/AForm field name
disabledbooleanfalseDisable the picker
requiredbooleanfalseMark as required
errorstringN/AError message (shown below trigger)
helperstringN/AHelper text (shown below trigger)
colorstringN/ATheme color (primary, secondary, info, success, warning, error)
sizestring'md'Size variant: sm, md, lg
variantstringN/AVisual variant: flat, solid, bordered, outline, ghost
roundedstringN/ABorder radius override
fullwidthbooleanfalseExpand to full container width

Events ​

EventDetailDescription
change{ value: string | null }Fired when a time is confirmed. value is always 24-hour HH:MM.

CSS Custom Properties ​

PropertyDescription
--time-picker-bgDropdown background
--time-picker-border-colorDropdown border color
--time-picker-radiusDropdown border radius
--time-picker-shadowDropdown drop shadow
--time-picker-selected-bgSelected option background
--time-picker-option-hover-bgHovered option background

Parts ​

PartDescription
fieldThe trigger field (ore-input)
dropdownThe floating time dropdown panel
columnA scrollable column (hours / minutes / period)
optionAn individual time option cell

Accessibility ​

ore-time-picker follows the ARIA Combobox Pattern for the trigger and Listbox Pattern for the dropdown.

The trigger has role="combobox", aria-haspopup="listbox", and aria-expanded reflecting open/closed state. The dropdown has role="listbox" with an aria-label derived from the component label. Each column is a role="group" with an aria-label ("Hours", "Minutes", "Period"), and each option cell has role="option", aria-selected, and aria-disabled.

The focused/selected option in each column has tabindex="0"; all others have tabindex="-1". Arrow keys move focus within a column with wrap-around. Enter confirms the pending selection and closes the dropdown. Escape dismisses the dropdown without committing. Disabled options have pointer-events: none and aria-disabled="true".