ant-design/components/date-picker/demo/range.md

22 lines
475 B
Markdown
Raw Normal View History

# 日期范围二
2015-05-27 20:41:16 +08:00
- order: 8
2015-06-02 17:20:02 +08:00
使用 `RangePicker` 实现日期范围选择有更好的交互体验。
2015-05-27 20:41:16 +08:00
---
````jsx
import { DatePicker } from 'antd';
const RangePicker = DatePicker.RangePicker;
function onChange(value) {
console.log('From: ', value[0], ', to: ', value[1]);
}
ReactDOM.render(<div>
<RangePicker style={{ width: 184 }} onChange={onChange} />
<br />
<RangePicker showTime format="yyyy/MM/dd HH:mm:ss" onChange={onChange} />
</div>, mountNode);
2015-05-27 20:41:16 +08:00
````