import React, { Component } from "react"; import { type Locale } from "./date_utils"; import InputTime from "./input_time"; import Month from "./month"; import MonthDropdown from "./month_dropdown"; import MonthYearDropdown from "./month_year_dropdown"; import Time from "./time"; import Year from "./year"; import YearDropdown from "./year_dropdown"; import type { ClickOutsideHandler } from "./click_outside_wrapper"; import type { Day } from "date-fns"; interface YearDropdownProps extends React.ComponentPropsWithoutRef { } interface MonthDropdownProps extends React.ComponentPropsWithoutRef { } interface MonthYearDropdownProps extends React.ComponentPropsWithoutRef { } interface YearProps extends React.ComponentPropsWithoutRef { } interface MonthProps extends React.ComponentPropsWithoutRef { } interface TimeProps extends React.ComponentPropsWithoutRef { } interface InputTimeProps extends React.ComponentPropsWithoutRef { } export interface ReactDatePickerCustomHeaderProps { date: CalendarState["date"]; customHeaderCount: number; monthDate: Date; changeMonth: (month: number) => void; changeYear: (year: number) => void; decreaseMonth: VoidFunction; increaseMonth: VoidFunction; decreaseYear: VoidFunction; increaseYear: VoidFunction; prevMonthButtonDisabled: boolean; nextMonthButtonDisabled: boolean; prevYearButtonDisabled: boolean; nextYearButtonDisabled: boolean; } type CalendarProps = React.PropsWithChildren & Omit & Omit & Omit & Omit & Omit & Omit & Omit & { className?: string; container?: React.ElementType; showYearPicker?: boolean; showMonthYearPicker?: boolean; showQuarterYearPicker?: boolean; showTimeSelect?: boolean; showTimeInput?: boolean; showYearDropdown?: boolean; showMonthDropdown?: boolean; yearItemNumber?: number; useWeekdaysShort?: boolean; forceShowMonthNavigation?: boolean; showDisabledMonthNavigation?: boolean; formatWeekDay?: (date: string) => string; onDropdownFocus?: (event: React.FocusEvent) => void; calendarStartDay?: Day; weekDayClassName?: (date: Date) => string; onMonthChange?: (date: Date) => void; onYearChange?: (date: Date) => void; onDayMouseEnter?: (date: Date) => void; onMonthMouseLeave?: VoidFunction; weekLabel?: string; onClickOutside: ClickOutsideHandler; outsideClickIgnoreClass?: string; previousMonthButtonLabel?: React.ReactNode; previousYearButtonLabel?: string; previousMonthAriaLabel?: string; previousYearAriaLabel?: string; nextMonthButtonLabel?: React.ReactNode; nextYearButtonLabel?: string; nextMonthAriaLabel?: string; nextYearAriaLabel?: string; showPreviousMonths?: boolean; monthsShown?: number; monthSelectedIn?: number; onSelect: (day: Date, event?: React.MouseEvent | React.KeyboardEvent, monthSelectedIn?: number) => void; renderCustomHeader?: (props: ReactDatePickerCustomHeaderProps) => JSX.Element; onYearMouseEnter?: YearProps["onYearMouseEnter"]; onYearMouseLeave?: YearProps["onYearMouseLeave"]; monthAriaLabelPrefix?: MonthProps["ariaLabelPrefix"]; handleOnDayKeyDown?: MonthProps["handleOnKeyDown"]; handleOnKeyDown?: (event: React.KeyboardEvent | React.KeyboardEvent | React.KeyboardEvent) => void; onTimeChange?: TimeProps["onChange"] | InputTimeProps["onChange"]; timeFormat?: TimeProps["format"]; timeIntervals?: TimeProps["intervals"]; } & (({ showMonthYearDropdown: true; } & Pick) | ({ showMonthYearDropdown?: never; } & Pick & Pick & Pick)); interface CalendarState extends Pick, Pick { date: Required["date"]; monthContainer: TimeProps["monthRef"]; isRenderAriaLiveMessage: boolean; } export default class Calendar extends Component { static get defaultProps(): { monthsShown: number; forceShowMonthNavigation: boolean; timeCaption: string; previousYearButtonLabel: string; nextYearButtonLabel: string; previousMonthButtonLabel: string; nextMonthButtonLabel: string; yearItemNumber: number; }; constructor(props: CalendarProps); componentDidMount(): void; componentDidUpdate(prevProps: CalendarProps): void; containerRef: React.RefObject; monthContainer: CalendarState["monthContainer"]; assignMonthContainer: void | undefined; handleClickOutside: (event: MouseEvent) => void; setClickOutsideRef: () => HTMLDivElement | null; handleDropdownFocus: (event: React.FocusEvent) => void; getDateInView: () => Date; increaseMonth: () => void; decreaseMonth: () => void; handleDayClick: (day: Date, event: React.MouseEvent | React.KeyboardEvent, monthSelectedIn?: number) => void; handleDayMouseEnter: (day: Date) => void; handleMonthMouseLeave: () => void; handleYearMouseEnter: (event: React.MouseEvent, year: number) => void; handleYearMouseLeave: (event: React.MouseEvent, year: number) => void; handleYearChange: (date: Date) => void; getEnabledPreSelectionDateForMonth: (date: Date) => Date | null; handleMonthChange: (date: Date) => void; handleCustomMonthChange: (date: Date) => void; handleMonthYearChange: (date: Date) => void; changeYear: (year: number) => void; changeMonth: (month: number) => void; changeMonthYear: (monthYear: Date) => void; header: (date?: Date) => JSX.Element[]; formatWeekday: (day: Date, locale?: Locale) => string; decreaseYear: () => void; clearSelectingDate: () => void; renderPreviousButton: () => JSX.Element | void; increaseYear: () => void; renderNextButton: () => JSX.Element | void; renderCurrentMonth: (date?: Date) => JSX.Element; renderYearDropdown: (overrideHide?: boolean) => JSX.Element | undefined; renderMonthDropdown: (overrideHide?: boolean) => JSX.Element | undefined; renderMonthYearDropdown: (overrideHide?: boolean) => JSX.Element | undefined; handleTodayButtonClick: (event: React.MouseEvent) => void; renderTodayButton: () => JSX.Element | undefined; renderDefaultHeader: ({ monthDate, i }: { monthDate: Date; i: number; }) => React.JSX.Element; renderCustomHeader: (headerArgs: { monthDate: Date; i: number; }) => React.JSX.Element | null; renderYearHeader: ({ monthDate }: { monthDate: Date; }) => JSX.Element; renderHeader: ({ monthDate, i, }: { monthDate: Date; i?: number; }) => JSX.Element | null; renderMonths: () => JSX.Element[] | undefined; renderYears: () => JSX.Element | undefined; renderTimeSection: () => JSX.Element | undefined; renderInputTimeSection: () => JSX.Element | undefined; renderAriaLiveRegion: () => JSX.Element; renderChildren: () => JSX.Element | undefined; render(): JSX.Element; } export {};