naive-ui/demo/documentation/components/date-picker/enUS/format.demo.md
2020-12-12 15:33:41 +08:00

478 B

Format

<n-space vertical>
  <n-date-picker
    v-model:value="timestamp"
    type="datetime"
    clearable
    :format="format"
  />
  <n-date-picker
    v-model:value="timestamp2"
    type="datetime"
    :format="format"
    clearable
  />
</n-space>
export default {
  data () {
    return {
      timestamp: null,
      timestamp2: 1183135260000,
      format: 'yyyy/MM/dd - HH:mm'
    }
  }
}
.n-date-picker {
  margin: 0 12px 8px 0;
}