mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-17 22:44:18 +08:00
[react-datepicker] align typing to v0.52.0 (#18374)
This commit is contained in:
29
types/react-datepicker/index.d.ts
vendored
29
types/react-datepicker/index.d.ts
vendored
@@ -1,30 +1,35 @@
|
||||
// Type definitions for react-datepicker 0.46
|
||||
// Type definitions for react-datepicker 0.52
|
||||
// Project: https://github.com/Hacker0x01/react-datepicker
|
||||
// Definitions by: Rajab Shakirov <https://github.com/radziksh>,
|
||||
// Andrey Balokha <https://github.com/andrewBalekha>,
|
||||
// Greg Smith <https://github.com/smrq>
|
||||
// Andrey Balokha <https://github.com/andrewBalekha>,
|
||||
// Greg Smith <https://github.com/smrq>,
|
||||
// Platon Pronko <https://github.com/Rogach>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
// TypeScript Version: 2.4
|
||||
|
||||
import * as React from "react";
|
||||
import * as moment from "moment";
|
||||
|
||||
export interface ReactDatePickerProps {
|
||||
allowSameDay?: boolean;
|
||||
autoComplete?: string;
|
||||
autoFocus?: boolean;
|
||||
calendarClassName?: string;
|
||||
children?: any;
|
||||
className?: string;
|
||||
customInput?: React.ReactNode;
|
||||
dateFormat?: string | string[];
|
||||
dateFormatCalendar?: string;
|
||||
dayClassName?(date: moment.Moment): string | null;
|
||||
disabled?: boolean;
|
||||
disabledKeyboardNavigation?: boolean;
|
||||
dropdownMode?: string;
|
||||
endDate?: moment.Moment;
|
||||
excludeDates?: any[];
|
||||
filterDate?(): any;
|
||||
filterDate?(date: moment.Moment): boolean;
|
||||
fixedHeight?: boolean;
|
||||
forceShowMonthNavigation?: boolean;
|
||||
formatWeekNumber?(date: moment.Moment): string | number;
|
||||
highlightDates?: any[];
|
||||
id?: string;
|
||||
includeDates?: any[];
|
||||
@@ -40,15 +45,17 @@ export interface ReactDatePickerProps {
|
||||
onChangeRaw?(event: React.FocusEvent<HTMLInputElement>): void;
|
||||
onClickOutside?(event: React.MouseEvent<HTMLDivElement>): void;
|
||||
onFocus?(event: React.FocusEvent<HTMLInputElement>): void;
|
||||
onKeyDown?(event: React.KeyboardEvent<HTMLDivElement>): void;
|
||||
onMonthChange?(date: moment.Moment): void;
|
||||
onSelect?(date: moment.Moment, event: React.SyntheticEvent<any> | undefined): void;
|
||||
onWeekSelect?(firstDayOfWeek: moment.Moment, weekNumber: string | number, event: React.SyntheticEvent<any> | undefined): void;
|
||||
openToDate?: moment.Moment;
|
||||
peekNextMonth?: boolean;
|
||||
placeholderText?: string;
|
||||
popoverAttachment?: string;
|
||||
popoverTargetAttachment?: string;
|
||||
popoverTargetOffset?: string;
|
||||
popperClassName?: string;
|
||||
popperModifiers?: any;
|
||||
popperPlacement?: string;
|
||||
readOnly?: boolean;
|
||||
renderCalendarTo?: any;
|
||||
required?: boolean;
|
||||
scrollableYearDropdown?: boolean;
|
||||
selected?: moment.Moment | null;
|
||||
@@ -59,12 +66,14 @@ export interface ReactDatePickerProps {
|
||||
showYearDropdown?: boolean;
|
||||
startDate?: moment.Moment;
|
||||
tabIndex?: number;
|
||||
tetherConstraints?: any[];
|
||||
title?: string;
|
||||
todayButton?: string;
|
||||
useWeekdaysShort?: boolean;
|
||||
utcOffset?: number;
|
||||
value?: string;
|
||||
weekLabel?: string;
|
||||
withPortal?: boolean;
|
||||
yearDropdownItemNumber?: number;
|
||||
}
|
||||
declare const ReactDatePicker: React.ClassicComponentClass<ReactDatePickerProps>;
|
||||
export default ReactDatePicker;
|
||||
|
||||
Reference in New Issue
Block a user