ant-design/components/date-picker/demo/disabled.md
2016-11-11 12:08:18 +08:00

650 B

order title
4
zh-CN en-US
禁用 Disabled

zh-CN

选择框的不可用状态。

en-US

A disabled state of the DatePicker.

import { DatePicker } from 'antd';
import moment from 'moment';
const { MonthPicker, RangePicker } = DatePicker;

const dateFormat = 'YYYY-MM-DD';
ReactDOM.render(
  <div>
    <DatePicker defaultValue={moment('2015-06-06', dateFormat)} disabled /><br />
    <MonthPicker defaultValue={moment('2015-06', 'YYYY-MM')} disabled /><br />
    <RangePicker
      defaultValue={[moment('2015-06-06', dateFormat), moment('2015-06-06', dateFormat)]}
      disabled
    />
  </div>,
  mountNode
);