ant-design/components/datepicker/demo/range.md
afc163 753c01ae18 ES6 syntax for demo code
fix antd.notification
2015-10-28 20:55:49 +08:00

23 lines
442 B
Markdown

# 范围
- order: 6
设置 `disabledDate` 方法,来确定不可选时段。
如上例:不可选择今天之后的日期。
---
````jsx
import { Datepicker } from 'antd';
const disabledDate = function(current, value) {
// can not select days after today
return current.getTime() > Date.now();
};
ReactDOM.render(
<Datepicker disabledDate={disabledDate} />
, document.getElementById('components-datepicker-demo-range'));
````