naive-ui/demo/documentation/components/datePicker/enUS/daterange.md

35 lines
497 B
Markdown
Raw Normal View History

2019-10-15 14:55:05 +08:00
# Date Range
```html
<n-date-picker
v-model="range1"
type="daterange"
2020-02-10 22:27:13 +08:00
clearable
:disabledTime="disabledTime"
2019-10-15 14:55:05 +08:00
/>
<n-date-picker
v-model="range2"
type="daterange"
2020-02-10 22:27:13 +08:00
clearable
2019-10-15 14:55:05 +08:00
/>
```
```js
export default {
data() {
return {
range1: null,
range2: [1562774466000, 1567180866000]
};
},
methods: {
disabledTime (current) {
return (current >= 1574092800000) && (current < 1576771200000)
}
2019-10-15 14:55:05 +08:00
}
}
```
```css
.n-date-picker {
margin: 0 12px 8px 0;
}
```