mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
WeekPicker: support renderExtraFooter
This commit is contained in:
parent
015945ed83
commit
a7bedca0e2
@ -100,6 +100,13 @@ class WeekPicker extends React.Component<any, WeekPickerState> {
|
||||
this.handleChange(null);
|
||||
};
|
||||
|
||||
renderFooter = (...args: any[]) => {
|
||||
const { prefixCls, renderExtraFooter } = this.props;
|
||||
return renderExtraFooter ? (
|
||||
<div className={`${prefixCls}-footer-extra`}>{renderExtraFooter(...args)}</div>
|
||||
) : null;
|
||||
};
|
||||
|
||||
focus() {
|
||||
this.input.focus();
|
||||
}
|
||||
@ -157,6 +164,7 @@ class WeekPicker extends React.Component<any, WeekPickerState> {
|
||||
showDateInput={false}
|
||||
showToday={false}
|
||||
disabledDate={disabledDate}
|
||||
renderFooter={this.renderFooter}
|
||||
/>
|
||||
);
|
||||
const clearIcon =
|
||||
|
@ -111,6 +111,7 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker, WeekPicke
|
||||
| format | to set the date format, refer to [moment.js](http://momentjs.com/) | string | "YYYY-wo" |
|
||||
| value | to set date | [moment](http://momentjs.com/) | - |
|
||||
| onChange | a callback function, can be executed when the selected time is changing | function(date: moment, dateString: string) | - |
|
||||
| renderExtraFooter | render extra footer in panel | (mode) => React.ReactNode | - |
|
||||
|
||||
### RangePicker
|
||||
|
||||
|
@ -114,6 +114,7 @@ moment.locale('zh-cn');
|
||||
| format | 展示的日期格式,配置参考 [moment.js](http://momentjs.com/) | string | "YYYY-wo" |
|
||||
| value | 日期 | [moment](http://momentjs.com/) | - |
|
||||
| onChange | 时间发生变化的回调,发生在用户选择时间时 | function(date: moment, dateString: string) | - |
|
||||
| renderExtraFooter | 在面板中添加额外的页脚 | (mode) => React.ReactNode | - |
|
||||
|
||||
### RangePicker
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user