mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #31405 from tylerthehaas/master
fix type of highlightDates prop
This commit is contained in:
Vendored
+5
-1
@@ -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()]}
|
||||
|
||||
Reference in New Issue
Block a user