mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-30 06:09:34 +08:00
36 lines
521 B
Markdown
36 lines
521 B
Markdown
---
|
|
order: 1
|
|
title:
|
|
zh-CN: 范围选择器
|
|
en-US: Range Picker
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
通过设置 `picker` 属性,指定范围选择器类型。
|
|
|
|
## en-US
|
|
|
|
Set range picker type by `picker` prop.
|
|
|
|
```jsx
|
|
import { DatePicker } from 'antd';
|
|
|
|
const { RangePicker } = DatePicker;
|
|
|
|
ReactDOM.render(
|
|
<>
|
|
<RangePicker />
|
|
<br />
|
|
<RangePicker showTime />
|
|
<br />
|
|
<RangePicker picker="week" />
|
|
<br />
|
|
<RangePicker picker="month" />
|
|
<br />
|
|
<RangePicker picker="year" />
|
|
</>,
|
|
mountNode,
|
|
);
|
|
```
|