naive-ui/demo/documentation/components/datePicker/zhCN/date.md

31 lines
544 B
Markdown
Raw Normal View History

2020-02-04 19:05:59 +08:00
# 日期
2020-01-11 00:56:39 +08:00
```html
<n-date-picker
v-model="timestamp"
type="date"
:disabledTime="disabledTime"
2020-02-10 22:27:13 +08:00
clearable
2020-01-11 00:56:39 +08:00
/>
2020-02-10 22:27:13 +08:00
<n-date-picker v-model="timestamp2" type="date" clearable />
2020-02-04 19:05:59 +08:00
<pre>{{ JSON.stringify(timestamp) }}, {{ JSON.stringify(timestamp2) }}</pre>
2020-01-11 00:56:39 +08:00
```
```js
export default {
data () {
return {
timestamp: null,
timestamp2: 1000000
}
},
methods: {
disabledTime (current) {
return (current >= 1574092800000) && (current < 1574438400000)
}
}
}
```
```css
.n-date-picker {
margin: 0 12px 8px 0;
}
```