naive-ui/demo/documentation/components/date-picker/enUS/actions.demo.md

28 lines
524 B
Markdown
Raw Normal View History

2019-10-15 14:55:05 +08:00
# Actions
2020-12-12 14:44:44 +08:00
2019-10-15 14:55:05 +08:00
```html
2020-11-25 16:58:50 +08:00
<n-space vertical>
2020-12-12 14:44:44 +08:00
<n-date-picker v-model:value="ts1" type="date" :actions="['confirm']" />
<n-date-picker v-model:value="ts2" type="datetime" :actions="['now']" />
<n-date-picker v-model:value="range1" type="daterange" :actions="null" />
2020-11-25 16:58:50 +08:00
<n-date-picker
v-model:value="range2"
type="datetimerange"
:actions="['clear']"
/>
</n-space>
2019-10-15 14:55:05 +08:00
```
2020-12-12 14:44:44 +08:00
2019-10-15 14:55:05 +08:00
```js
export default {
data() {
return {
ts1: null,
2020-05-31 14:21:09 +08:00
ts2: 1183135260000,
range1: null,
range2: null
2019-10-15 14:55:05 +08:00
}
}
2020-05-31 14:21:09 +08:00
}
2019-10-15 14:55:05 +08:00
```