diff --git a/components/date-picker/index.tsx b/components/date-picker/index.tsx index 88f48772e9..3aab5b1c27 100755 --- a/components/date-picker/index.tsx +++ b/components/date-picker/index.tsx @@ -22,6 +22,7 @@ export interface PickerProps { getCalendarContainer?: (trigger: any) => React.ReactNode; open?: boolean; onOpenChange?: (status: boolean) => void; + disabledDate?: (current: moment.Moment) => boolean; } export interface SinglePickerProps { @@ -36,14 +37,17 @@ export interface DatePickerProps extends PickerProps, SinglePickerProps { showToday?: boolean; open?: boolean; toggleOpen?: (e: {open: boolean}) => void; - disabledDate?: (current: moment.Moment) => boolean; + disabledTime?: (current: moment.Moment) => { + disabledHours?: () => [number, number], + disabledMinutes?: () => [number, number], + disabledSeconds?: () => [number, number], + }; onOpenChange?: (status: boolean) => void; placeholder?: string; } const DatePicker = wrapPicker(createPicker(RcCalendar)) as React.ClassicComponentClass; export interface MonthPickerProps extends PickerProps, SinglePickerProps { - disabledDate?: (current: moment.Moment) => boolean; placeholder?: string; } const MonthPicker = wrapPicker(createPicker(MonthCalendar), 'YYYY-MM'); @@ -57,6 +61,12 @@ export interface RangePickerProps extends PickerProps { ranges?: { [range: string]: moment.Moment[], }; + placeholder?: [string, string], + disabledTime?: (current: moment.Moment, type: string) => { + disabledHours?: () => [number, number], + disabledMinutes?: () => [number, number], + disabledSeconds?: () => [number, number], + }; } assign(DatePicker, { diff --git a/components/table/Table.tsx b/components/table/Table.tsx index b279adf95b..71f40467cb 100755 --- a/components/table/Table.tsx +++ b/components/table/Table.tsx @@ -62,6 +62,8 @@ export interface TableProps { expandedRowKeys?: string[]; expandIconAsCell?: boolean; expandIconColumnIndex?: number; + onExpandedRowsChange?: (expandedRowKeys: string[]) => void; + onExpand?: (expanded: boolean, record: T) => void; onChange?: (pagination: PaginationProps | boolean, filters: string[], sorter: Object) => any; loading?: boolean; locale?: Object;