Time pickers
The v-time-picker
is stand-alone component that can be utilized in many existing Vuetify components. It offers the user a visual representation for selecting the time.
WARNING
This feature requires v3.5.12
Installation
Labs components require a manual import and installation of the component.
import { VTimePicker } from 'vuetify/labs/VTimePicker'
export default createVuetify({
components: {
VTimePicker,
},
})
Usage
Time pickers have the light theme enabled by default.
API
Component | Description |
---|---|
v-time-picker | Primary Component |
Examples
Props
Allowed times
You can specify allowed times using arrays, objects, and functions. You can also specify time step/precision/interval - e.g. 10 minutes.
Colors
Time picker colors can be set using the color
and header-color
props. If header-color
prop is not provided header will use the color
prop value."
Disabled
You can't interact with disabled picker.
Elevation
Emphasize the v-time-picker
component by providing an elevation from 0 to 24. Elevation modifies the box-shadow
css property.
Format
A time picker can be switched to 24hr format. Note that the format
prop defines only the way the picker is displayed, picker's value (model) is always in 24hr format.
No header
You can remove picker's header.
Range
This is an example of joining pickers together using min
and max
prop.
Read-only
Read-only picker behaves same as disabled one, but looks like default one.
Scrollable
You can edit time picker's value using mouse wheel.
Use seconds
Time picker can have seconds input.
Misc
Dialog and menu
Due to the flexibility of pickers, you can really dial in the experience exactly how you want it.