Time picker

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.

用例

Time pickers have the light theme enabled by default.

API

v-time-picker
名称
allowed-hours
默认值
null
类型
function

Components.TimePickers.

名称
allowed-minutes
默认值
null
类型
function

Components.TimePickers.

名称
allowed-seconds
默认值
null
类型
function

Components.TimePickers.

名称
color
默认值
undefined
类型
string

将指定的色彩应用与控件

名称
dark
默认值
false
类型
boolean

应用暗黑主题变体

名称
disabled New in — v1.4
默认值
false
类型
boolean

Components.TimePickers.

名称
format
默认值
'ampm'
类型
string

Components.TimePickers.

名称
full-width
默认值
false
类型
boolean

Forces 100% width

名称
header-color
默认值
undefined
类型
string

定义标题颜色。如果未指定,将使用由颜色(color)属性或默认选取器颜色定义的颜色。

名称
landscape
默认值
false
类型
boolean

Orients picker horizontal

名称
light
默认值
false
类型
boolean

应用明亮主题变体

名称
max
默认值
undefined
类型
string

设置最大宽度

名称
min
默认值
undefined
类型
string

设置最小宽度

名称
no-title
默认值
false
类型
boolean

隐藏选取器标题

名称
readonly New in — v1.2
默认值
false
类型
boolean

Components.TimePickers.

名称
scrollable
默认值
false
类型
boolean

Components.TimePickers.

名称
use-seconds
默认值
false
类型
boolean

Components.TimePickers.

名称
value
默认值
undefined
类型
any

控制可见性

名称
width
默认值
290
类型
number | string

内容的宽度

示例

Time pickers - 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.

Time pickers - In dialog and menu

Due to the flexibility of pickers, you can really dial in the experience exactly how you want it.

Time pickers - 24h 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.

Time pickers - Allowed times

You can specify allowed times using arrays, objects, and functions. You can also specify time step/precision/interval - e.g. 10 minutes.

Time pickers - Setting picker width

You can specify allowed the picker's width or make it full width.

Edit this page | language on Github
Vuetify 3 is now available!The latest version of Vuetify is now available!
Learn about Vuetify 3's new features and functionality for modern Vue applications
Start exploringExplore