feat: showNow on timepicker and datetimepicker (#25032)

This commit is contained in:
07akioni 2020-06-16 18:59:48 +08:00 committed by GitHub
parent 1ef7e4e296
commit 8906dfb549
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 1 deletions

View File

@ -92,6 +92,7 @@ The following APIs are shared by DatePicker, YearPicker, MonthPicker, RangePicke
| onChange | a callback function, can be executed when the selected time is changing | function(date: moment, dateString: string) | - | |
| onOk | callback when click ok button | function() | - | |
| onPanelChange | Callback function for panel changing | function(value, mode) | - | |
| showNow | Whether to show 'Now' button on panel when `showTime` is set | boolean | - | 4.4.0 |
### YearPicker

View File

@ -94,6 +94,7 @@ import 'moment/locale/zh-cn';
| onChange | 时间发生变化的回调 | function(date: moment, dateString: string) | 无 | |
| onOk | 点击确定按钮的回调 | function() | - | |
| onPanelChange | 日期面板变化时的回调 | function(value, mode) | - | |
| showNow | 当设定了 `showTime` 的时候,面板是否显示“此刻”按钮 | boolean | - | 4.4.0 |
### YearPicker

View File

@ -53,6 +53,7 @@ import moment from 'moment';
| value | to set time | [moment](http://momentjs.com/) | - | |
| onChange | a callback function, can be executed when the selected time is changing | function(time: moment, timeString: string): void | - | |
| onOpenChange | a callback function which will be called while panel opening/closing | (open: boolean): void | - | |
| showNow | Whether to show 'Now' button on panel | boolean | - | 4.4.0 |
## Methods

View File

@ -53,6 +53,7 @@ import moment from 'moment';
| value | 当前时间 | [moment](http://momentjs.com/) | 无 | |
| onChange | 时间发生变化的回调 | function(time: moment, timeString: string): void | 无 | |
| onOpenChange | 面板打开/关闭时的回调 | (open: boolean): void | 无 | |
| showNow | 面板是否显示“此刻”按钮 | boolean | - | 4.4.0 |
## 方法

View File

@ -127,7 +127,7 @@
"rc-menu": "~8.3.0",
"rc-notification": "~4.4.0",
"rc-pagination": "~2.3.0",
"rc-picker": "~1.6.1",
"rc-picker": "~1.7.0",
"rc-progress": "~3.0.0",
"rc-rate": "~2.8.0",
"rc-resize-observer": "^0.2.3",