2016-03-31 09:40:55 +08:00
|
|
|
---
|
|
|
|
order: 1
|
2016-06-19 11:17:09 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 日期格式
|
|
|
|
en-US: Date format
|
2016-03-31 09:40:55 +08:00
|
|
|
---
|
2015-12-10 16:12:10 +08:00
|
|
|
|
2016-06-19 11:17:09 +08:00
|
|
|
## zh-CN
|
|
|
|
|
2015-12-10 16:12:10 +08:00
|
|
|
使用 `format` 属性,可以自定义你需要的日期显示格式,如 `yyyy/MM/dd`。
|
|
|
|
|
2016-06-19 11:17:09 +08:00
|
|
|
## en-US
|
|
|
|
|
|
|
|
By using `format`, you can customize the format(such as `yyyy/MM/dd`) the date is displayed in.
|
|
|
|
|
2015-12-10 16:12:10 +08:00
|
|
|
````jsx
|
|
|
|
import { DatePicker } from 'antd';
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<DatePicker defaultValue="2015/01/01" format="yyyy/MM/dd" />
|
2015-12-29 12:08:58 +08:00
|
|
|
, mountNode);
|
2015-12-10 16:12:10 +08:00
|
|
|
````
|