Skip to content

TimePicker

A scrollable time picker component with 24-hour format. Opens a popover with hour and minute columns, scrolls to the selected value automatically, and closes on outside click.

Basic Usage

Demo
09:30

Selected: 09:30

Disabled State

Disabled
14:45

Without Label

No Label
09:30

Props

Props
PropTypeDefaultDescription
modelValuestring | nullnullThe selected time value in HH:mm format (24h). Use with v-model.
labelstringundefinedText label displayed above the input field.
requiredbooleanfalseMarks the field as required. Shows a red asterisk next to the label.
disabledbooleanfalseDisables the picker, preventing user interaction.
placeholderstring'00:00'Placeholder shown when no value is selected.

Emits

Emits
EventPayloadDescription
update:modelValuestring | nullEmitted when the user selects a new hour or minute. Value is in HH:mm format.
changestring | nullAlso emitted on every selection change. Useful when you cannot use v-model.

Accessibility

  • The trigger element is keyboard-accessible via click.
  • Closes automatically on outside click via @vueuse/core onClickOutside.
  • Popover uses z-50 so it always renders above other content.

Built with VitePress