|
|
@ -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<DatePickerProps>; |
|
|
|
|
|
|
|
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, { |
|
|
|