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 ​

PreviewCode
RTL
html
<ore-time-picker label="Meeting time"></ore-time-picker>

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.

PreviewCode
RTL
html
<ore-time-picker label="Start time" value="09:30"></ore-time-picker>

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.

PreviewCode
RTL
html
<ore-time-picker label="Appointment" time-format="12" value="14:00"></ore-time-picker>

Minute Step ​

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

PreviewCode
RTL
html
<ore-time-picker label="Duration" minute-step="15"></ore-time-picker>

Min / Max Bounds ​

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

PreviewCode
RTL
html
<ore-time-picker label="Office hours" min="09:00" max="17:00"> </ore-time-picker>

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.

PreviewCode
RTL
html
<form>
  <ore-time-picker name="meeting_time" label="Meeting time" required></ore-time-picker>
  <button type="submit">Submit</button>
</form>

Sizes ​

PreviewCode
RTL
html
<ore-time-picker size="sm" label="Small"></ore-time-picker>
<ore-time-picker size="md" label="Medium"></ore-time-picker>
<ore-time-picker size="lg" label="Large"></ore-time-picker>

Variants ​

PreviewCode
RTL
html
<ore-time-picker variant="flat" placeholder="Flat"></ore-time-picker>
<ore-time-picker variant="bordered" placeholder="Bordered"></ore-time-picker>
<ore-time-picker variant="outline" placeholder="Outline"></ore-time-picker>
<ore-time-picker variant="ghost" placeholder="Ghost"></ore-time-picker>

Colors ​

PreviewCode
RTL
html
<ore-time-picker placeholder="Default"></ore-time-picker>
<ore-time-picker color="primary" placeholder="Primary"></ore-time-picker>
<ore-time-picker color="secondary" placeholder="Secondary"></ore-time-picker>
<ore-time-picker color="success" placeholder="Success"></ore-time-picker>
<ore-time-picker color="warning" placeholder="Warning"></ore-time-picker>
<ore-time-picker color="error" placeholder="Error"></ore-time-picker>

Error and Helper Text ​

PreviewCode
RTL
html
<ore-time-picker label="Departure time" helper="Must be between 06:00 and 22:00"> </ore-time-picker>

<ore-time-picker label="Return time" error="A valid time is required" color="error"> </ore-time-picker>

Disabled ​

PreviewCode
RTL
html
<ore-time-picker label="Read-only time" value="10:00" disabled></ore-time-picker>

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".