2016-03-31 09:40:55 +08:00
|
|
|
---
|
|
|
|
order: 9
|
2016-09-09 13:55:21 +08:00
|
|
|
title:
|
2016-06-19 11:17:09 +08:00
|
|
|
zh-CN: 月选择器
|
|
|
|
en-US: MonthPicker
|
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
|
|
|
|
|
|
|
|
使用 `MonthPicker` 实现月选择器。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
You can get a month selector by using `MonthPicker`.
|
2015-12-10 16:12:10 +08:00
|
|
|
|
|
|
|
````jsx
|
|
|
|
import { DatePicker } from 'antd';
|
2016-09-09 13:55:21 +08:00
|
|
|
import moment from 'moment';
|
|
|
|
|
2015-12-10 16:12:10 +08:00
|
|
|
const MonthPicker = DatePicker.MonthPicker;
|
|
|
|
ReactDOM.render(
|
2016-09-09 13:55:21 +08:00
|
|
|
<MonthPicker defaultValue={moment('2015-12', 'YYYY-MM')} />
|
2015-12-29 12:08:58 +08:00
|
|
|
, mountNode);
|
2015-12-10 16:12:10 +08:00
|
|
|
````
|