TimePicker ​

Use Time Picker for time input.

Arbitrary time picker ​

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.

To
To

API ​

Attributes ​

NameDescriptionTypeDefault
model-value / v-modelbinding value, if it is an array, the length should be 2number / string / object''
readonlywhether TimePicker is read onlybooleanfalse
disabledwhether TimePicker is disabledbooleanfalse
editablewhether the input is editablebooleantrue
clearablewhether to show clear buttonbooleantrue
sizesize of Inputenum—
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 rangebooleanfalse
arrow-controlwhether to pick time using arrow buttonsbooleanfalse
popper-classcustom class name for TimePicker's dropdownstring''
popper-stylecustom style for TimePicker's dropdownstring / object—
popper-optionsCustomized popper option see more at popper.jsobject{}
fallback-placements 2.8.4list of possible positions for Tooltip popper.jsarray['bottom', 'top', 'right', 'left']
placement 2.8.4position of dropdownPlacementbottom
range-separatorrange separatorstring'-'
formatformat of the displayed value in the input boxstring see date formats—
default-valueoptional, default date of the calendarDate / array—
value-formatoptional, format of binding value. If not specified, the binding value will be a Date objectstring see date formats—
idsame as id in native inputstring / array—
namesame as name in native inputstring''
aria-label a11y 2.7.2same as aria-label in native inputstring—
prefix-iconCustom prefix icon componentstring / ComponentClock
clear-iconCustom clear icon componentstring / ComponentCircleClose
disabled-hoursTo specify the array of hours that cannot be selectedFunction—
disabled-minutesTo specify the array of minutes that cannot be selectedFunction—
disabled-secondsTo specify the array of seconds that cannot be selectedFunction—
teleportedwhether time-picker dropdown is teleported to the bodybooleantrue
tabindexinput tabindexstring / number0
empty-values 2.7.0empty values of component, see config-providerarray—
value-on-clear 2.7.0clear return value, see config-providerstring / number / boolean / Function—
save-on-blur 2.13.4Whether to auto-fill the input with the current time on focus when no value is selectedbooleantrue
label a11y deprecatedsame as aria-label in native inputstring—

Events ​

NameDescriptionType
changetriggers when user confirms the valueFunction
blurtriggers when Input blursFunction
focustriggers when Input focusesFunction
clear 2.7.7triggers when the clear icon is clicked in a clearable TimePickerFunction
visible-changetriggers when the TimePicker's dropdown appears/disappearsFunction

Exposes ​

NameDescriptionType
focusfocus the TimePicker componentFunction
blurblur the TimePicker componentFunction
handleOpen 2.2.16open the TimePicker popperFunction
handleClose 2.2.16close the TimePicker popperFunction

Type Declarations ​

Show declarations
ts
type Placement =
  | 'top'
  | 'top-start'
  | 'top-end'
  | 'bottom'
  | 'bottom-start'
  | 'bottom-end'
  | 'left'
  | 'left-start'
  | 'left-end'
  | 'right'
  | 'right-start'
  | 'right-end'

Source ​

Component • Style • Docs

Contributors ​