// Type definitions for react-datepicker 2.10 // Project: https://github.com/Hacker0x01/react-datepicker // Definitions by: Rajab Shakirov , // Andrey Balokha , // Greg Smith , // Platon Pronko // Roy Xue // Koala Human // Justin Grant // Jake Boone // Roman Nuritdinov // Avi Klaiman // Naoki Sekiguchi // tu4mo // Kerry Gougeon // Walter Kennedy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import * as React from 'react'; import * as Popper from 'popper.js'; import { Locale } from 'date-fns'; export function registerLocale(localeName: string, localeData: {}): void; export function setDefaultLocale(localeName: string): void; export function getDefaultLocale(): string; interface HighlightDates { [className: string]: Date[]; } export interface ReactDatePickerProps { adjustDateOnChange?: boolean; allowSameDay?: boolean; ariaLabelledBy?: string; autoComplete?: string; autoFocus?: boolean; calendarClassName?: string; calendarContainer?(props: { children: React.ReactNode[] }): React.ReactNode; children?: React.ReactNode; className?: string; clearButtonTitle?: string; customInput?: React.ReactNode; customInputRef?: string; dateFormat?: string | string[]; dateFormatCalendar?: string; dayClassName?(date: Date): string | null; disabled?: boolean; disabledKeyboardNavigation?: boolean; dropdownMode?: 'scroll' | 'select'; endDate?: Date | null; excludeDates?: Date[]; excludeTimes?: Date[]; filterDate?(date: Date): boolean; fixedHeight?: boolean; forceShowMonthNavigation?: boolean; formatWeekDay?(formattedDate: string): string; formatWeekNumber?(date: Date): string | number; highlightDates?: Array; id?: string; includeDates?: Date[]; includeTimes?: Date[]; injectTimes?: Date[]; inline?: boolean; inlineFocusSelectedMonth?: boolean; isClearable?: boolean; locale?: string | Locale; maxDate?: Date | null; maxTime?: Date; minDate?: Date | null; minTime?: Date; monthsShown?: number; name?: string; nextMonthButtonLabel?: string; nextYearButtonLabel?: string; onBlur?(event: React.FocusEvent): void; onCalendarClose?(): void; onCalendarOpen?(): void; onChange(date: Date | null, event: React.SyntheticEvent | undefined): void; onChangeRaw?(event: React.FocusEvent): void; onClickOutside?(event: React.MouseEvent): void; onDayMouseEnter?: (date: Date) => void; onFocus?(event: React.FocusEvent): void; onInputClick?(): void; onInputError?(err: { code: number; msg: string }): void; onKeyDown?(event: React.KeyboardEvent): void; onMonthChange?(date: Date): void; onMonthMouseLeave?: () => void; onSelect?(date: Date, event: React.SyntheticEvent | undefined): void; onWeekSelect?( firstDayOfWeek: Date, weekNumber: string | number, event: React.SyntheticEvent | undefined, ): void; onYearChange?(date: Date): void; open?: boolean; openToDate?: Date; peekNextMonth?: boolean; placeholderText?: string; popperClassName?: string; popperContainer?(props: { children: React.ReactNode[] }): React.ReactNode; popperModifiers?: Popper.Modifiers; popperPlacement?: string; popperProps?: {}; preventOpenOnFocus?: boolean; previousMonthButtonLabel?: string; previousYearButtonLabel?: string; readOnly?: boolean; renderCustomHeader?(params: { date: Date; changeYear(year: number): void; changeMonth(month: number): void; decreaseMonth(): void; increaseMonth(): void; prevMonthButtonDisabled: boolean; nextMonthButtonDisabled: boolean; }): React.ReactNode; renderDayContents?(dayOfMonth: number, date?: Date): React.ReactNode; required?: boolean; scrollableMonthYearDropdown?: boolean; scrollableYearDropdown?: boolean; selected?: Date | null; selectsEnd?: boolean; selectsStart?: boolean; shouldCloseOnSelect?: boolean; showDisabledMonthNavigation?: boolean; showMonthDropdown?: boolean; showMonthYearDropdown?: boolean; showMonthYearPicker?: boolean; showPopperArrow?: boolean; showPreviousMonths?: boolean; showQuarterYearPicker?: boolean; showTimeInput?: boolean; showTimeSelect?: boolean; showTimeSelectOnly?: boolean; showWeekNumbers?: boolean; showYearDropdown?: boolean; startDate?: Date | null; startOpen?: boolean; strictParsing?: boolean; tabIndex?: number; timeCaption?: string; timeFormat?: string; timeInputLabel?: string; timeIntervals?: number; title?: string; todayButton?: React.ReactNode; useShortMonthInDropdown?: boolean; useWeekdaysShort?: boolean; value?: string; weekLabel?: string; withPortal?: boolean; wrapperClassName?: string; yearDropdownItemNumber?: number; } declare class ReactDatePicker extends React.Component { readonly setBlur: () => void; readonly setFocus: () => void; readonly setOpen: (open: boolean, skipSetBlur?: boolean) => void; readonly isCalendarOpen: () => boolean; } export default ReactDatePicker;