2019-10-19 19:52:47 +08:00
|
|
|
# Datetime
|
2019-10-15 14:55:05 +08:00
|
|
|
```html
|
|
|
|
<n-date-picker
|
|
|
|
v-model="timestamp"
|
|
|
|
type="datetime"
|
2019-11-29 11:07:24 +08:00
|
|
|
:disabledTime= "disabledTime"
|
2020-02-10 22:27:13 +08:00
|
|
|
clearable
|
2019-10-15 14:55:05 +08:00
|
|
|
/>
|
2020-02-10 22:27:13 +08:00
|
|
|
<n-date-picker v-model="timestamp2" type="datetime" clearable />
|
2019-10-15 14:55:05 +08:00
|
|
|
```
|
|
|
|
```js
|
|
|
|
export default {
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
timestamp: null,
|
|
|
|
timestamp2: 1000000
|
|
|
|
}
|
2019-11-29 11:07:24 +08:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
disabledTime (current) {
|
|
|
|
return current > 1573552182000 && current < 1573811382000
|
|
|
|
}
|
2019-10-15 14:55:05 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
```css
|
|
|
|
.n-date-picker {
|
|
|
|
margin: 0 12px 8px 0;
|
|
|
|
}
|
|
|
|
```
|