vuetify-datetime-picker (vuetify-datetime-picker)
DatetimePicker component for Vuetify.js.
Vuetify.js的DatetimePicker组件。
安装 (Installation)
npm install --save vuetify-datetime-picker
or
yarn add vuetify-datetime-picker
import Vue from 'vue'
import DatetimePicker from 'vuetify-datetime-picker'
import 'vuetify-datetime-picker/src/stylus/main.styl'
Vue.use(DatetimePicker)
用法 (Usage)
Once installed, it can be used in a template as simply as:
安装后,可以在模板中简单地使用它,如下所示:
<v-datetime-picker
label="Select Datetime"
v-model="datetime">
</v-datetime-picker>
物产 (Properties)
Name | Type | Default Value | Description |
---|---|---|---|
datetime (model) | Date/String | Time picker model. | |
label | string | Sets input label. | |
width | Number | 320 | The width of the content. |
format | string | YYYY-MM-DD HH:mm:ss | Defines the format of a datetime displayed in field. |
timePickerFormat | string | 24hr | Defines the format of a time displayed in picker. Available options are ampm and 24hr. |
locale | string | en-us | Sets the locale. Accepts a string with a BCP 47 language tag. |
clearText | string | CLEAR | Sets the handler when the clear button clicked. |
okText | string | OK | Sets the color of the ok button to danger. |
名称 | 类型 | 默认值 | 描述 |
---|---|---|---|
日期时间(模型) | 日期/字串 | 时间选择器模型。 | |
标签 | 串 | 设置输入标签。 | |
宽度 | 数 | 320 | 内容的宽度。 |
格式 | 串 | YYYY-MM-DD HH:mm:ss | 定义字段中显示的日期时间的格式。 |
timePickerFormat | 串 | 24小时 | 定义在选择器中显示的时间格式。 可用选项为ampm和24hr。 |
地区 | 串 | 我们 | 设置语言环境。 接受带有BCP 47语言标记的字符串。 |
clearText | 串 | 明确 | 单击清除按钮时设置处理程序。 |
okText | 串 | 好 | 将确定按钮的颜色设置为危险。 |
大事记 (Events)
Name | Arguments | Description |
---|---|---|
input | value (Date/String) | The updated bound model |
名称 | 争论 | 描述 |
---|---|---|
输入 | 值(日期/字符串) | 更新的绑定模型 |
翻译自: https://vuejsexamples.com/datetimepicker-component-for-vuetify-js/