mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
544 B
544 B
日期
<n-date-picker
v-model="timestamp"
type="date"
:disabledTime="disabledTime"
clearable
/>
<n-date-picker v-model="timestamp2" type="date" clearable />
<pre>{{ JSON.stringify(timestamp) }}, {{ JSON.stringify(timestamp2) }}</pre>
export default {
data () {
return {
timestamp: null,
timestamp2: 1000000
}
},
methods: {
disabledTime (current) {
return (current >= 1574092800000) && (current < 1574438400000)
}
}
}
.n-date-picker {
margin: 0 12px 8px 0;
}