diff --git a/types/react-datepicker/index.d.ts b/types/react-datepicker/index.d.ts index 5f07b253f3..e2870092dc 100644 --- a/types/react-datepicker/index.d.ts +++ b/types/react-datepicker/index.d.ts @@ -19,6 +19,10 @@ 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; @@ -45,7 +49,7 @@ export interface ReactDatePickerProps { forceShowMonthNavigation?: boolean; formatWeekDay?(date: Date): string; formatWeekNumber?(date: Date): string | number; - highlightDates?: Date[]; + highlightDates?: Array; id?: string; includeDates?: Date[]; includeTimes?: Date[]; diff --git a/types/react-datepicker/react-datepicker-tests.tsx b/types/react-datepicker/react-datepicker-tests.tsx index b47c08ed73..5e913be496 100644 --- a/types/react-datepicker/react-datepicker-tests.tsx +++ b/types/react-datepicker/react-datepicker-tests.tsx @@ -34,7 +34,7 @@ const defaultLocale = getDefaultLocale(); forceShowMonthNavigation formatWeekDay={date => ''} formatWeekNumber={date => 0} - highlightDates={[new Date()]} + highlightDates={[{ someClassName: [new Date()]}]} id="" includeDates={[new Date()]} includeTimes={[new Date()]}