2016-03-31 09:40:55 +08:00
|
|
|
---
|
2016-11-11 12:08:18 +08:00
|
|
|
order: 4
|
2016-06-19 11:17:09 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 禁用
|
|
|
|
en-US: Disabled
|
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
|
|
|
选择框的不可用状态。
|
|
|
|
|
2016-06-19 11:17:09 +08:00
|
|
|
## en-US
|
|
|
|
|
|
|
|
A disabled state of the `DatePicker`.
|
|
|
|
|
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';
|
2016-11-11 12:08:18 +08:00
|
|
|
const { MonthPicker, RangePicker } = DatePicker;
|
2015-12-10 16:12:10 +08:00
|
|
|
|
2016-11-11 12:08:18 +08:00
|
|
|
const dateFormat = 'YYYY-MM-DD';
|
2015-12-10 16:12:10 +08:00
|
|
|
ReactDOM.render(
|
2016-11-11 12:08:18 +08:00
|
|
|
<div>
|
2016-11-14 19:13:37 +08:00
|
|
|
<DatePicker defaultValue={moment('2015-06-06', dateFormat)} disabled />
|
|
|
|
<br />
|
|
|
|
<MonthPicker defaultValue={moment('2015-06', 'YYYY-MM')} disabled />
|
|
|
|
<br />
|
2016-11-11 12:08:18 +08:00
|
|
|
<RangePicker
|
|
|
|
defaultValue={[moment('2015-06-06', dateFormat), moment('2015-06-06', dateFormat)]}
|
|
|
|
disabled
|
|
|
|
/>
|
2016-11-14 19:13:37 +08:00
|
|
|
</div>
|
|
|
|
, mountNode);
|
2015-12-10 16:12:10 +08:00
|
|
|
````
|