Time Picker

Use Time Picker for time input.

Basic usage

Can pick an arbitrary time.

By default, you can scroll the mouse wheel to pick time, alternatively you can use the control arrows when the arrow-control attribute is set.

Limit the time range

You can also limit the time range.

Limit the time range by specifying disabledHours disabledMinutes and disabledSeconds.

Arbitrary time range

Can pick an arbitrary time range.

We can pick a time range by adding an is-range attribute. Also, arrow-control is supported in range mode.

Attributes

NameDescriptionTypeAccepted ValuesDefault
model-value / v-modelbinding value, if it is an array, the length should be 2Date / number / string / Array——
readonlywhether TimePicker is read onlyboolean—false
disabledwhether TimePicker is disabledboolean—false
editablewhether the input is editableboolean—true
clearablewhether to show clear buttonboolean—true
sizesize of Inputstringlarge / default / small—
placeholderplaceholder in non-range modestring——
start-placeholderplaceholder for the start time in range modestring——
end-placeholderplaceholder for the end time in range modestring——
is-rangewhether to pick a time rangeboolean—false
arrow-controlwhether to pick time using arrow buttonsboolean—false
popper-classcustom class name for TimePicker's dropdownstring——
range-separatorrange separatorstring—'-'
formatformat of the displayed value in the input boxstringsee date formatsHH:mm:ss
default-valueoptional, default date of the calendarDate / [Date, Date]——
idsame as id in native inputstring / [string, string]—-
namesame as name in native inputstring——
prefix-iconCustom prefix icon componentstring | Component—History
clear-iconCustom clear icon componentstring | Component—Close
disabled-hoursTo specify the array of hours that cannot be selectedfunction——
disabled-minutesTo specify the array of minutes that cannot be selectedFunction (selectedHour)——
disabled-secondsTo specify the array of seconds that cannot be selectedFunction (selectedHour, selectedMinute)——
teleportedwhether time-picker dropdown is teleported to the bodybooleantrue / falsetrue

Events

NameDescriptionParameters
changetriggers when user confirms the value(val: typeof v-model)
blurtriggers when Input blurs(e: FocusEvent)
focustriggers when Input focuses(e: FocusEvent)
visible-changetriggers when the TimePicker's dropdown appears/disappears(visibility: boolean)

Methods

MethodDescriptionParameters
focusfocus the Input component—
blurblur the Input component—
handleOpenopen the TimePicker popper—
handleCloseclose the TimePicker popper—
Last Updated:
Contributors: Tam Mai