ant-design/components/date-picker/demo/range.md
Benjy Cui 4026221d45 deps: hello moment (#2887)
* deps: upgrade TimePicker

* deps: upgrade DatePicker

* deps: upgrade Calendar

* fix: moment should work with LocaleProvider

* feat: update API of TimePicker

* feat: update Calendar's APIs

* feat: update DatePicker's APIs

* doc: update demo

* revert: add dateString and timeString and so on

* feat: add Calendar[defaultValue]

* feat: add defaultPickerValue

* docs: update docs about date picker

* feat: set moment locale to zh-cn automatically
2016-09-09 13:55:21 +08:00

717 B

order title
8
zh-CN en-US
日期范围二 Date range, case 2

zh-CN

使用 RangePicker 实现日期范围选择有更好的交互体验。

en-US

By using RangePicker to specify a date range, you can achieve a better interactive experience.

import { DatePicker } from 'antd';
const RangePicker = DatePicker.RangePicker;

function onChange(dates, dateStrings) {
  console.log('From: ', dates[0], ', to: ', dates[1]);
  console.log('From: ', dateStrings[0], ', to: ', dateStrings[1]);
}
ReactDOM.render(<div>
  <RangePicker style={{ width: 184 }} onChange={onChange} />
  <br />
  <RangePicker showTime format="YYYY/MM/DD HH:mm:ss" onChange={onChange} />
</div>, mountNode);