mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 21:10:23 +00:00
[react-datepicker] Update @types/react-datepicker to comply with react-datepicker v2.10 (#41125)
* Update `@types/react-datepicker` to comply with `react-datepicker` `v2.10` * Update to remove `(...args: any)`
This commit is contained in:
committed by
Andrew Branch
parent
162254c14e
commit
160b87bfbf
Vendored
+11
-7
@@ -1,4 +1,4 @@
|
||||
// Type definitions for react-datepicker 2.9
|
||||
// Type definitions for react-datepicker 2.10
|
||||
// Project: https://github.com/Hacker0x01/react-datepicker
|
||||
// Definitions by: Rajab Shakirov <https://github.com/radziksh>,
|
||||
// Andrey Balokha <https://github.com/andrewBalekha>,
|
||||
@@ -32,6 +32,7 @@ interface HighlightDates {
|
||||
export interface ReactDatePickerProps {
|
||||
adjustDateOnChange?: boolean;
|
||||
allowSameDay?: boolean;
|
||||
ariaLabelledBy?: string;
|
||||
autoComplete?: string;
|
||||
autoFocus?: boolean;
|
||||
calendarClassName?: string;
|
||||
@@ -61,6 +62,7 @@ export interface ReactDatePickerProps {
|
||||
includeTimes?: Date[];
|
||||
injectTimes?: Date[];
|
||||
inline?: boolean;
|
||||
inlineFocusSelectedMonth?: boolean;
|
||||
isClearable?: boolean;
|
||||
locale?: string | Locale;
|
||||
maxDate?: Date | null;
|
||||
@@ -72,14 +74,18 @@ export interface ReactDatePickerProps {
|
||||
nextMonthButtonLabel?: string;
|
||||
nextYearButtonLabel?: string;
|
||||
onBlur?(event: React.FocusEvent<HTMLInputElement>): void;
|
||||
onCalendarClose?(): void;
|
||||
onCalendarOpen?(): void;
|
||||
onChange(date: Date | null, event: React.SyntheticEvent<any> | undefined): void;
|
||||
onChangeRaw?(event: React.FocusEvent<HTMLInputElement>): void;
|
||||
onClickOutside?(event: React.MouseEvent<HTMLDivElement>): void;
|
||||
onDayMouseEnter?: (date: Date) => void;
|
||||
onFocus?(event: React.FocusEvent<HTMLInputElement>): void;
|
||||
onInputClick?(): void;
|
||||
onInputError?(err: { code: number; msg: string }): void;
|
||||
onKeyDown?(event: React.KeyboardEvent<HTMLDivElement>): void;
|
||||
onMonthChange?(date: Date): void;
|
||||
onMonthMouseLeave?: () => void;
|
||||
onSelect?(date: Date, event: React.SyntheticEvent<any> | undefined): void;
|
||||
onWeekSelect?(
|
||||
firstDayOfWeek: Date,
|
||||
@@ -121,8 +127,10 @@ export interface ReactDatePickerProps {
|
||||
showMonthDropdown?: boolean;
|
||||
showMonthYearDropdown?: boolean;
|
||||
showMonthYearPicker?: boolean;
|
||||
showQuarterYearPicker?: boolean;
|
||||
showPopperArrow?: boolean;
|
||||
showPreviousMonths?: boolean;
|
||||
showQuarterYearPicker?: boolean;
|
||||
showTimeInput?: boolean;
|
||||
showTimeSelect?: boolean;
|
||||
showTimeSelectOnly?: boolean;
|
||||
showWeekNumbers?: boolean;
|
||||
@@ -133,6 +141,7 @@ export interface ReactDatePickerProps {
|
||||
tabIndex?: number;
|
||||
timeCaption?: string;
|
||||
timeFormat?: string;
|
||||
timeInputLabel?: string;
|
||||
timeIntervals?: number;
|
||||
title?: string;
|
||||
todayButton?: React.ReactNode;
|
||||
@@ -143,11 +152,6 @@ export interface ReactDatePickerProps {
|
||||
withPortal?: boolean;
|
||||
wrapperClassName?: string;
|
||||
yearDropdownItemNumber?: number;
|
||||
timeInputLabel?: string;
|
||||
showTimeInput?: boolean;
|
||||
inlineFocusSelectedMonth?: boolean;
|
||||
onDayMouseEnter?: (date: Date) => void;
|
||||
onMonthMouseLeave?: () => void;
|
||||
}
|
||||
|
||||
declare class ReactDatePicker extends React.Component<ReactDatePickerProps> {
|
||||
|
||||
@@ -9,6 +9,7 @@ const defaultLocale = getDefaultLocale();
|
||||
<DatePicker
|
||||
adjustDateOnChange
|
||||
allowSameDay
|
||||
ariaLabelledBy=""
|
||||
autoComplete=""
|
||||
autoFocus
|
||||
calendarClassName=""
|
||||
@@ -37,6 +38,7 @@ const defaultLocale = getDefaultLocale();
|
||||
includeTimes={[new Date()]}
|
||||
injectTimes={[new Date()]}
|
||||
inline
|
||||
inlineFocusSelectedMonth={false}
|
||||
isClearable
|
||||
locale=""
|
||||
maxDate={new Date()}
|
||||
@@ -48,14 +50,18 @@ const defaultLocale = getDefaultLocale();
|
||||
nextMonthButtonLabel=""
|
||||
nextYearButtonLabel=""
|
||||
onBlur={event => null}
|
||||
onCalendarClose={() => null}
|
||||
onCalendarOpen={() => null}
|
||||
onChange={(date: Date | null) => {}}
|
||||
onChangeRaw={event => null}
|
||||
onClickOutside={event => null}
|
||||
onDayMouseEnter={(date: Date) => {}}
|
||||
onFocus={event => null}
|
||||
onInputClick={() => null}
|
||||
onInputError={err => err.code + err.msg}
|
||||
onKeyDown={event => null}
|
||||
onMonthChange={date => null}
|
||||
onMonthMouseLeave={() => {}}
|
||||
onSelect={(date, event) => null}
|
||||
onWeekSelect={(firstDayOfWeek, weekNumber, event) => null}
|
||||
onYearChange={(date: Date) => {}}
|
||||
@@ -98,8 +104,9 @@ const defaultLocale = getDefaultLocale();
|
||||
showMonthDropdown
|
||||
showMonthYearDropdown
|
||||
showMonthYearPicker
|
||||
showQuarterYearPicker
|
||||
showPopperArrow
|
||||
showPreviousMonths
|
||||
showQuarterYearPicker
|
||||
showTimeSelect
|
||||
showTimeSelectOnly
|
||||
showWeekNumbers
|
||||
@@ -109,6 +116,7 @@ const defaultLocale = getDefaultLocale();
|
||||
tabIndex={1}
|
||||
timeCaption=""
|
||||
timeFormat=""
|
||||
timeInputLabel=""
|
||||
timeIntervals={1}
|
||||
title=""
|
||||
todayButton={<div />}
|
||||
@@ -119,10 +127,6 @@ const defaultLocale = getDefaultLocale();
|
||||
withPortal
|
||||
wrapperClassName=""
|
||||
yearDropdownItemNumber={1}
|
||||
timeInputLabel=""
|
||||
inlineFocusSelectedMonth={false}
|
||||
onDayMouseEnter={(date: Date) => {}}
|
||||
onMonthMouseLeave={() => {}}
|
||||
>
|
||||
<div />
|
||||
<span />
|
||||
|
||||
Reference in New Issue
Block a user