Skip to content
Theme:

Ui3nTimePicker ​

Inline time picker panel with configurable hour, minute and second fields. The component is not a popover input: the fields are always rendered, while the open model controls the dropdown of the active field.

v-model is a string | null in the format produced by config, for example 22:30, 22:30:15 or 07:33 PM. minuteStep and secondStep align the displayed value and may emit a normalized value on mount, so use values that already match the configured steps.

v-model:open controls the active field dropdown: setting it to true opens the hours dropdown, and false closes all dropdowns. When opening a dropdown from an external control, stop the click from bubbling to window (.stop); otherwise the menu's outside-click handler can close it during the same click event.

Props

NameTypeDefaultDescription
idstring | undefined —

Root element id

configUi3nTimePickerConfig | undefined{}

Time picker display configuration

sizeUi3nDateTimePickerSize | undefined"regular"

Component size

minuteStepUi3nTimePickerMinuteSecondStep | undefined5

Step for minutes. The displayed value is aligned to the step; on mount the component emits the aligned value if it differs from `modelValue`.

secondStepUi3nTimePickerMinuteSecondStep | undefined1

Step for seconds. The displayed value is aligned to the step; on mount the component emits the aligned value if it differs from `modelValue`.

modelValue*string | null —

Time value in the format produced by `config`, e.g. `HH:mm`, `HH:mm:ss` or `hh:mm A`

localeConfigPick<Ui3nDateTimeLocaleConfig, "secondShort" | "minuteShort" | "hourShort"> | undefined{}

Localized short labels for hours, minutes and seconds

disabledboolean | undefined —

Whether all time fields are disabled

openboolean | undefinedfalse No description provided

Events

Event NameArguments / Value TypeDescription
update:modelValuevalue: string | null —
update:openvalue: boolean —

CSS Variables

Set any of these where you need it — on :root, on a container, or on the element itself through [data-ui3n] — and the component follows. Leave them alone and it uses the defaults below.

NameDefault
--ui3n-time-picker-gap8px
--ui3n-time-picker-padding8px

Usage Examples ​

Basic usage ​

A 24-hour time picker bound to an HH:mm string.

Basic usage

Default 24-hour format with five-minute steps

12-hour format with seconds ​

Switches to the 12-hour format with AM/PM and displays the seconds field.

12-hour format with seconds

12-hour format with seconds and leading zeros

Custom steps and size ​

Uses ten-minute and five-second steps together with the large size. The initial value is aligned to both steps.

Custom steps and size

Large time picker with custom minute and second steps

Minutes and seconds only ​

Hides the hours field and renders only the minute and second selectors.

Minutes and seconds only

Time picker without an hours field

Leading zeros and disabled state ​

Shows values without leading zeros next to a fully disabled picker.

Leading zeros and disabled state

Single-digit values and a disabled time picker

Controlled open state ​

Binds v-model:open to a local ref and opens or closes the active field dropdown with buttons. This does not hide the inline fields.

Controlled open state

Programmatically opening and closing the active field dropdown