import React from 'react'; import dayjs from 'dayjs'; import { MaterialUiPickersDate as MuiPickersDate } from '@material-ui/pickers/typings/date'; import { RcBaseProps, RcBaseSize, RcClassesProps } from '../../../../foundation'; import { RcPopoverProps } from '../../../Popover'; import { PickerTextFieldProps } from '../utils'; import { CalendarProps } from './Calendar'; import { RcDatePickerClasses, ScreenReaderProps } from './utils'; declare type RcDatePickerSize = RcBaseSize<'small' | 'medium'>; declare type RcDatePickerProps = { /** size for date picker, default with medium */ size?: RcDatePickerSize; /** * Calendar onChange * * @param {Date} date update date value * @param {boolean} fromUserSelect is that change come from user select day, when `false` mean that is come from range limitation */ onChange?: (date: Date | null, fromUserSelect?: boolean) => void; /** i18n locale country */ locale?: string; /** value for picker */ value?: Date | null; /** Props containing functions for getting attribute for target element */ screenReaderProps?: ScreenReaderProps; /** Date format string, default with 'MM/DD/YYYY' */ formatString?: string; /** when hover on the textField, if show the clearBtn. With default is true. */ clearBtn?: boolean; /** Min date */ min?: Date | MuiPickersDate; /** Max date */ max?: Date | MuiPickersDate; /** Text label for Today button */ todayButtonText?: string; /** @deprecated Min date @DateIOType, using min instead */ minDate?: MuiPickersDate; /** @deprecated Max date @DateIOType, using max instead */ maxDate?: MuiPickersDate; /** @deprecated please use value to replace that */ date?: RcDatePickerProps['value']; } & RcBaseProps, 'date' | 'dateRange' | 'handleDaySelect' | 'getInvalidateDateInRange'> & RcBaseProps & Pick & RcClassesProps<'popover' | 'popoverPaper'>; declare const DEFAULT_FORMAT = "MM/DD/YYYY"; declare const RcDatePicker: import("styled-components").StyledComponentClass<{ /** size for date picker, default with medium */ size?: "small" | "medium" | undefined; /** * Calendar onChange * * @param {Date} date update date value * @param {boolean} fromUserSelect is that change come from user select day, when `false` mean that is come from range limitation */ onChange?: ((date: Date | null, fromUserSelect?: boolean | undefined) => void) | undefined; /** i18n locale country */ locale?: string | undefined; /** value for picker */ value?: Date | null | undefined; /** Props containing functions for getting attribute for target element */ screenReaderProps?: ScreenReaderProps | undefined; /** Date format string, default with 'MM/DD/YYYY' */ formatString?: string | undefined; /** when hover on the textField, if show the clearBtn. With default is true. */ clearBtn?: boolean | undefined; /** Min date */ min?: Date | dayjs.Dayjs | null | undefined; /** Max date */ max?: Date | dayjs.Dayjs | null | undefined; /** Text label for Today button */ todayButtonText?: string | undefined; /** @deprecated Min date @DateIOType, using min instead */ minDate?: dayjs.Dayjs | null | undefined; /** @deprecated Max date @DateIOType, using max instead */ maxDate?: dayjs.Dayjs | null | undefined; /** @deprecated please use value to replace that */ date?: Date | null | undefined; } & Pick, "classes" | "size" | "disablePast" | "disableFuture" | "todayButtonText" | "formatString" | "renderDay" | "shouldDisableDate" | "onMonthChange" | "loadingIndicator"> & Pick & Pick, "onClose"> & RcClassesProps<"popover" | "popoverPaper"> & React.RefAttributes, import("../../../../foundation").RcTheme, Pick<{ /** size for date picker, default with medium */ size?: "small" | "medium" | undefined; /** * Calendar onChange * * @param {Date} date update date value * @param {boolean} fromUserSelect is that change come from user select day, when `false` mean that is come from range limitation */ onChange?: ((date: Date | null, fromUserSelect?: boolean | undefined) => void) | undefined; /** i18n locale country */ locale?: string | undefined; /** value for picker */ value?: Date | null | undefined; /** Props containing functions for getting attribute for target element */ screenReaderProps?: ScreenReaderProps | undefined; /** Date format string, default with 'MM/DD/YYYY' */ formatString?: string | undefined; /** when hover on the textField, if show the clearBtn. With default is true. */ clearBtn?: boolean | undefined; /** Min date */ min?: Date | dayjs.Dayjs | null | undefined; /** Max date */ max?: Date | dayjs.Dayjs | null | undefined; /** Text label for Today button */ todayButtonText?: string | undefined; /** @deprecated Min date @DateIOType, using min instead */ minDate?: dayjs.Dayjs | null | undefined; /** @deprecated Max date @DateIOType, using max instead */ maxDate?: dayjs.Dayjs | null | undefined; /** @deprecated please use value to replace that */ date?: Date | null | undefined; } & Pick, "classes" | "size" | "disablePast" | "disableFuture" | "todayButtonText" | "formatString" | "renderDay" | "shouldDisableDate" | "onMonthChange" | "loadingIndicator"> & Pick & Pick, "onClose"> & RcClassesProps<"popover" | "popoverPaper"> & React.RefAttributes, "ref" | "key" | "className" | "id" | "max" | "min" | "radius" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onClick" | "date" | "label" | "classes" | "placeholder" | "size" | "value" | "variant" | "disabled" | "action" | "autoFocus" | "onClose" | "fullWidth" | "error" | "inputProps" | "inputRef" | "required" | "InputProps" | "helperText" | "gutterBottom" | "onClear" | "clearBtn" | "clearButtonProps" | "validate" | "disablePast" | "disableFuture" | "todayButtonText" | "formatString" | "renderDay" | "shouldDisableDate" | "onMonthChange" | "loadingIndicator" | "PopoverProps" | "ActionSymbol" | "locale" | "screenReaderProps" | "minDate" | "maxDate"> & { theme?: import("../../../../foundation").RcTheme | undefined; }>; export { DEFAULT_FORMAT, RcDatePicker, RcDatePickerClasses }; export type { RcDatePickerProps, RcDatePickerSize };