naive-ui/demo/documentation/components/datePicker/zhCN/datetime.md
2020-01-11 00:56:39 +08:00

451 B

Datetime

<n-date-picker
  v-model="timestamp"
  type="datetime"
  :disabledTime= "disabledTime"
/>
<n-date-picker v-model="timestamp2" type="datetime" />
export default {
  data () {
    return {
      timestamp: null,
      timestamp2: 1000000
    }
  },
  methods: {
    disabledTime (current) {
      return current > 1573552182000 && current < 1573811382000
    }
  }
}
.n-date-picker {
  margin: 0 12px 8px 0;
}