feat: RangePicker support info (#24278)

This commit is contained in:
二货机器人 2020-05-19 20:13:11 +08:00 committed by GitHub
parent 6106aab9d5
commit c40b291415
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View File

@ -144,6 +144,7 @@ Added in `4.1.0`.
| Property | Description | Type | Default | Version | | Property | Description | Type | Default | Version |
| --- | --- | --- | --- | --- | | --- | --- | --- | --- | --- |
| allowEmpty | Allow start or end input leave empty | \[boolean, boolean] | \[false, false] | | | allowEmpty | Allow start or end input leave empty | \[boolean, boolean] | \[false, false] | |
| dateRender | Customize date cell. `info` argument is added in 4.3.0 | function(currentDate: moment, today: moment, info: { range: 'start' \| ''end }) => React.ReactNode | - | |
| defaultValue | to set default date | \[[moment](http://momentjs.com/), [moment](http://momentjs.com/)] | - | | | defaultValue | to set default date | \[[moment](http://momentjs.com/), [moment](http://momentjs.com/)] | - | |
| defaultPickerValue | to set default picker date | \[[moment](http://momentjs.com/), [moment](http://momentjs.com/)\] | - | | | defaultPickerValue | to set default picker date | \[[moment](http://momentjs.com/), [moment](http://momentjs.com/)\] | - | |
| disabled | disable start or end | `[boolean, boolean]` | - | | | disabled | disable start or end | `[boolean, boolean]` | - | |

View File

@ -146,6 +146,7 @@ import 'moment/locale/zh-cn';
| 参数 | 说明 | 类型 | 默认值 | 版本 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
| --- | --- | --- | --- | --- | | --- | --- | --- | --- | --- |
| allowEmpty | 允许起始项部分为空 | \[boolean, boolean] | \[false, false] | | | allowEmpty | 允许起始项部分为空 | \[boolean, boolean] | \[false, false] | |
| dateRender | 自定义日期单元格的内容。`info` 参数自 4.3.0 添加 | function(currentDate: moment, today: moment, info: { range: 'start' \| ''end }) => React.ReactNode | - | |
| defaultValue | 默认日期 | [moment](http://momentjs.com/)\[] | 无 | | | defaultValue | 默认日期 | [moment](http://momentjs.com/)\[] | 无 | |
| defaultPickerValue | 默认面板日期 | [moment](http://momentjs.com/)\[] | 无 | | | defaultPickerValue | 默认面板日期 | [moment](http://momentjs.com/)\[] | 无 | |
| disabled | 禁用起始项 | `[boolean, boolean]` | 无 | | | disabled | 禁用起始项 | `[boolean, boolean]` | 无 | |

View File

@ -127,7 +127,7 @@
"rc-menu": "~8.2.1", "rc-menu": "~8.2.1",
"rc-notification": "~4.3.0", "rc-notification": "~4.3.0",
"rc-pagination": "~2.2.0", "rc-pagination": "~2.2.0",
"rc-picker": "~1.4.16", "rc-picker": "~1.5.0",
"rc-progress": "~3.0.0", "rc-progress": "~3.0.0",
"rc-rate": "~2.6.0", "rc-rate": "~2.6.0",
"rc-resize-observer": "^0.2.0", "rc-resize-observer": "^0.2.0",