mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
docs: MonthPicker doesn't support onOk, close: #5350
This commit is contained in:
parent
18da0deb5e
commit
174c3b7d62
@ -47,7 +47,6 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker.
|
|||||||
| open | open state of picker | boolean | - |
|
| open | open state of picker | boolean | - |
|
||||||
| onOpenChange | a callback function, can be executed whether the popup calendar is popped up or closed | function(status) | - |
|
| onOpenChange | a callback function, can be executed whether the popup calendar is popped up or closed | function(status) | - |
|
||||||
| placeholder | placeholder of date input | string\|RangePicker[] | - |
|
| placeholder | placeholder of date input | string\|RangePicker[] | - |
|
||||||
| onOk | callback when click ok button | function() | - |
|
|
||||||
|
|
||||||
### DatePicker
|
### DatePicker
|
||||||
|
|
||||||
@ -60,6 +59,7 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker.
|
|||||||
| showTime | to provide an additional time selection | object\|boolean | [TimePicker Options](/components/time-picker/#API) |
|
| showTime | to provide an additional time selection | object\|boolean | [TimePicker Options](/components/time-picker/#API) |
|
||||||
| showToday | whether to show "Today" button | boolean | true |
|
| showToday | whether to show "Today" button | boolean | true |
|
||||||
| disabledTime | to specify the time that cannot be selected | function(date) | - |
|
| disabledTime | to specify the time that cannot be selected | function(date) | - |
|
||||||
|
| onOk | callback when click ok button | function() | - |
|
||||||
|
|
||||||
### MonthPicker
|
### MonthPicker
|
||||||
|
|
||||||
@ -82,6 +82,7 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker.
|
|||||||
| showTime | to provide an additional time selection | object\|boolean | [TimePicker Options](/components/time-picker/#API) |
|
| showTime | to provide an additional time selection | object\|boolean | [TimePicker Options](/components/time-picker/#API) |
|
||||||
| disabledTime | to specify the time that cannot be selected | function(dates: [moment, moment], partial: `'start'|'end'`) | - |
|
| disabledTime | to specify the time that cannot be selected | function(dates: [moment, moment], partial: `'start'|'end'`) | - |
|
||||||
| ranges | preseted ranges for quick selection | { [range: string]: [moment](http://momentjs.com/)[] } | - |
|
| ranges | preseted ranges for quick selection | { [range: string]: [moment](http://momentjs.com/)[] } | - |
|
||||||
|
| onOk | callback when click ok button | function() | - |
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.code-box-demo .ant-calendar-picker {
|
.code-box-demo .ant-calendar-picker {
|
||||||
|
@ -43,6 +43,7 @@ export interface DatePickerProps extends PickerProps, SinglePickerProps {
|
|||||||
disabledSeconds?: () => [number, number],
|
disabledSeconds?: () => [number, number],
|
||||||
};
|
};
|
||||||
onOpenChange?: (status: boolean) => void;
|
onOpenChange?: (status: boolean) => void;
|
||||||
|
onOk?: () => void;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
}
|
}
|
||||||
const DatePicker = wrapPicker(createPicker(RcCalendar)) as React.ClassicComponentClass<DatePickerProps>;
|
const DatePicker = wrapPicker(createPicker(RcCalendar)) as React.ClassicComponentClass<DatePickerProps>;
|
||||||
@ -57,6 +58,7 @@ export interface RangePickerProps extends PickerProps {
|
|||||||
defaultValue?: [moment.Moment, moment.Moment];
|
defaultValue?: [moment.Moment, moment.Moment];
|
||||||
defaultPickerValue?: [moment.Moment, moment.Moment];
|
defaultPickerValue?: [moment.Moment, moment.Moment];
|
||||||
onChange?: (dates: [moment.Moment, moment.Moment], dateStrings: [string, string]) => void;
|
onChange?: (dates: [moment.Moment, moment.Moment], dateStrings: [string, string]) => void;
|
||||||
|
onOk?: () => void;
|
||||||
showTime?: TimePickerProps | boolean;
|
showTime?: TimePickerProps | boolean;
|
||||||
ranges?: {
|
ranges?: {
|
||||||
[range: string]: moment.Moment[],
|
[range: string]: moment.Moment[],
|
||||||
|
@ -48,7 +48,6 @@ moment.locale('zh-cn');
|
|||||||
| open | 控制弹层是否展开 | boolean | - |
|
| open | 控制弹层是否展开 | boolean | - |
|
||||||
| onOpenChange | 弹出日历和关闭日历的回调 | function(status) | 无 |
|
| onOpenChange | 弹出日历和关闭日历的回调 | function(status) | 无 |
|
||||||
| placeholder | 输入框提示文字 | string\|RangePicker[] | - |
|
| placeholder | 输入框提示文字 | string\|RangePicker[] | - |
|
||||||
| onOk | 点击确定按钮的回调 | function() | - |
|
|
||||||
|
|
||||||
### DatePicker
|
### DatePicker
|
||||||
|
|
||||||
@ -61,6 +60,7 @@ moment.locale('zh-cn');
|
|||||||
| showTime | 增加时间选择功能 | Object\|boolean | [TimePicker Options](/components/time-picker/#API) |
|
| showTime | 增加时间选择功能 | Object\|boolean | [TimePicker Options](/components/time-picker/#API) |
|
||||||
| showToday | 是否展示“今天”按钮 | boolean | true |
|
| showToday | 是否展示“今天”按钮 | boolean | true |
|
||||||
| disabledTime | 不可选择的时间 | function(date) | 无 |
|
| disabledTime | 不可选择的时间 | function(date) | 无 |
|
||||||
|
| onOk | 点击确定按钮的回调 | function() | - |
|
||||||
|
|
||||||
### MonthPicker
|
### MonthPicker
|
||||||
|
|
||||||
@ -83,6 +83,7 @@ moment.locale('zh-cn');
|
|||||||
| showTime | 增加时间选择功能 | Object\|boolean | [TimePicker Options](/components/time-picker/#API) |
|
| showTime | 增加时间选择功能 | Object\|boolean | [TimePicker Options](/components/time-picker/#API) |
|
||||||
| disabledTime | 不可选择的时间 | function(dates: [moment, moment], partial: `'start'|'end'`) | 无 |
|
| disabledTime | 不可选择的时间 | function(dates: [moment, moment], partial: `'start'|'end'`) | 无 |
|
||||||
| ranges | 预设事件范围快捷选择 | { [range: string]: [moment](http://momentjs.com/)[] } | 无 |
|
| ranges | 预设事件范围快捷选择 | { [range: string]: [moment](http://momentjs.com/)[] } | 无 |
|
||||||
|
| onOk | 点击确定按钮的回调 | function() | - |
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.code-box-demo .ant-calendar-picker {
|
.code-box-demo .ant-calendar-picker {
|
||||||
|
Loading…
Reference in New Issue
Block a user