mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
546 B
546 B
格式化
<n-date-picker
v-model="timestamp"
type="datetime"
:disabledTime= "disabledTime"
clearable
:format="format"
/>
<n-date-picker v-model="timestamp2" type="datetime" :format="format" clearable />
export default {
data () {
return {
timestamp: null,
timestamp2: 1000000,
format: 'yyyy/MM/dd - HH:mm'
}
},
methods: {
disabledTime (current) {
return current > 1573552182000 && current < 1573811382000
}
}
}
.n-date-picker {
margin: 0 12px 8px 0;
}