naive-ui/demo/documentation/components/datePicker/enUS/format.demo.md

26 lines
400 B
Markdown
Raw Normal View History

2020-02-19 16:24:39 +08:00
# Format
```html
<n-date-picker
v-model="timestamp"
type="datetime"
clearable
:format="format"
/>
<n-date-picker v-model="timestamp2" type="datetime" :format="format" clearable />
```
```js
export default {
data () {
return {
timestamp: null,
2020-05-31 14:21:09 +08:00
timestamp2: 1183135260000,
2020-02-26 17:21:03 +08:00
format: 'yyyy/MM/dd - HH:mm'
2020-02-19 16:24:39 +08:00
}
}
}
```
```css
.n-date-picker {
margin: 0 12px 8px 0;
}
```