import { LOCALE_MAP } from "../../system/Locale"; import "react-datepicker/dist/react-datepicker.min.css"; import "./DatePicker.scss"; /** * These are the props that are part of the `react-datepicker` library, rather than our own component. * When we upgrade `react-datepicker` to v7, we should be able to remove these since that version * introduces TypeScript support. */ type ReactDatePickerProps = { /** * Limits the choices in the calendar to the dates supplied in this list */ includeDates?: Date[]; openToDate?: Date; placeholderText?: string; portalId?: string; /** * @default undefined */ zIndex?: 10 | 20 | 30 | 40 | 50; /** * @default 30 */ popperZIndex?: 10 | 20 | 30 | 40 | 50; }; export type DatePickerProps = { /** * @deprecated please use the LocaleContext instead * * The locale determines the language and formatting of the dates * shown in this component. E.g. for "nl-NL" the date will be * shown as "dd-mm-yyyy", while for "en-GB" it shows as "dd/mm/yyyy". * */ locale?: keyof typeof LOCALE_MAP; className?: string; selected?: Date; hasCloseButton?: boolean; closeButtonText?: string; onChange?: (date: Date | null) => void; /** * @default true */ showMonthDropdown?: boolean; /** * @default true */ showYearDropdown?: boolean; minDate?: Date; maxDate?: Date; isDisabled?: boolean; /** * When set to `true`, if e.g. 10 January 2023 is selected and the user * changes to a different month or year, the 10th will still be selected. * When set to `false`, the date that the user has selected will not change * until they select a new date. * * @default true */ adjustDateOnChange?: boolean; /** * @default false */ formatDateWithTime?: boolean; shouldCloseOnSelect?: boolean; /** * @default false */ allowSameDay?: boolean; } & ReactDatePickerProps; export declare const DatePicker: (props: DatePickerProps) => import("react").JSX.Element; export {};