Merge pull request #31405 from tylerthehaas/master

fix type of highlightDates prop
This commit is contained in:
Nathan Shively-Sanders
2018-12-19 09:23:02 -08:00
committed by GitHub
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -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<HighlightDates|Date>;
id?: string;
includeDates?: Date[];
includeTimes?: Date[];
@@ -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()]}