// Type definitions for react-dates v7.0.1 // Project: https://github.com/airbnb/react-dates // Definitions by: Artur Ampilogov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 import * as React from "react"; import * as moment from "moment"; export = ReactDates; declare namespace momentPropTypes{ type momentObj = any; type momentString = any; type momentDurationObj = any; } declare namespace ReactDates{ type AnchorDirectionShape = 'left' | 'right'; type FocusedInputShape = 'startDate' | 'endDate'; type OrientationShape = 'horizontal' | 'vertical'; type ScrollableOrientationShape = 'horizontal' | 'vertical' | 'verticalScrollable'; interface DateRangePickerShape{ startDate?: momentPropTypes.momentObj, endDate?: momentPropTypes.momentObj, focusedInput?: FocusedInputShape, screenReaderInputMessage?: string, minimumNights?: number, isDayBlocked?: (day: any) => boolean, isOutsideRange?: (day: any) => boolean, enableOutsideDays?: boolean, reopenPickerOnClearDates?: boolean, keepOpenOnDateSelect?: boolean, numberOfMonths?: number, showClearDates?: boolean, disabled?: boolean, required?: boolean, showDefaultInputIcon?: boolean, orientation?: OrientationShape, anchorDirection?: AnchorDirectionShape, horizontalMargin?: number, // portal options withPortal?: boolean, withFullScreenPortal?: boolean, startDateId?: string, startDatePlaceholderText?: string, endDateId?: string, endDatePlaceholderText?: string, initialVisibleMonth?: () => moment.Moment, onDatesChange?: (arg: { startDate: any, endDate: any }) => void, onFocusChange?: (arg: FocusedInputShape) => void, onPrevMonthClick?: (e: React.EventHandler>) => void, onNextMonthClick?: (e: React.EventHandler>) => void, renderDay?: (day: any) => (string | JSX.Element), // i18n displayFormat?: (string | (()=> string)), monthFormat?: string, phrases?: { closeDatePicker: string | JSX.Element, clearDates: string | JSX.Element, } } type DateRangePicker = React.ClassicComponentClass; var DateRangePicker: React.ClassicComponentClass; interface SingleDatePickerShape{ id: string, placeholder?: string, date?: momentPropTypes.momentObj, focused?: boolean, showClearDate?: boolean, reopenPickerOnClearDates?: boolean, keepOpenOnDateSelect?: boolean, disabled?: boolean, required?: boolean, screenReaderInputMessage?: string, onDateChange?: (date: any) => void, onFocusChange?: (arg: { focused: boolean | null }) => void, isDayBlocked?: (day: any) => boolean, isOutsideRange?: (day: any) => boolean, enableOutsideDays?: boolean, numberOfMonths?: number, orientation?: OrientationShape, initialVisibleMonth?: () => moment.Moment, anchorDirection?: AnchorDirectionShape, horizontalMargin?: number, navPrev?: string | JSX.Element, navNext?: string | JSX.Element, // portal options withPortal?: boolean, withFullScreenPortal?: boolean, onPrevMonthClick?: (e: React.EventHandler>) => void, onNextMonthClick?: (e: React.EventHandler>) => void, renderDay?: (day: any) => (string | JSX.Element), // i18n displayFormat?: (string | (()=> string)), monthFormat?: string, phrases?: { closeDatePicker: string | JSX.Element, }, } type SingleDatePicker = React.ClassicComponentClass; var SingleDatePicker: React.ClassicComponentClass; interface DateRangePickerInputControllerShape { startDate?: momentPropTypes.momentObj, startDateId?: string, startDatePlaceholderText?: string, isStartDateFocused?: boolean, endDate?: momentPropTypes.momentObj, endDateId?: string, endDatePlaceholderText?: string, isEndDateFocused?: boolean, screenReaderMessage?: string, showClearDates?: boolean, showCaret?: boolean, showDefaultInputIcon?: boolean, disabled?: boolean, required?: boolean, keepOpenOnDateSelect?: boolean, reopenPickerOnClearDates?: boolean, withFullScreenPortal?: boolean, isOutsideRange?: (day: any) => boolean, displayFormat?: (string | (()=> string)), onFocusChange?: (arg: FocusedInputShape) => void, onDatesChange?: (arg: { startDate: any, endDate: any }) => void, customInputIcon?: string | JSX.Element, customArrowIcon?: string | JSX.Element, // i18n phrases?: { clearDates: string | JSX.Element, } } type DateRangePickerInputController = React.ClassicComponentClass; var DateRangePickerInputController: React.ClassicComponentClass; interface DateRangePickerInputShape{ startDateId?: string, startDatePlaceholderText?: string, screenReaderMessage?: string, endDateId?: string, endDatePlaceholderText?: string, onStartDateFocus?: (e: React.EventHandler>) => void, onEndDateFocus?: (e: React.EventHandler>) => void, onStartDateChange?: (e: React.EventHandler>) => void, onEndDateChange?: (e: React.EventHandler>) => void, onStartDateShiftTab?: (e: React.EventHandler>) => void, onEndDateTab?: (e: React.EventHandler>) => void, onClearDates?: (e: React.EventHandler>) => void, startDate?: string, startDateValue?: string, endDate?: string, endDateValue?: string, isStartDateFocused?: boolean, isEndDateFocused?: boolean, showClearDates?: boolean, disabled?: boolean, required?: boolean, showCaret?: boolean, showDefaultInputIcon?: boolean, customInputIcon?: string | JSX.Element, customArrowIcon?: string | JSX.Element, // i18n phrases?:{ clearDates: string | JSX.Element, }, } type DateRangePickerInput = React.ClassicComponentClass; var DateRangePickerInput: React.ClassicComponentClass; interface SingleDatePickerInputShape{ id: string, placeholder?: string, // also used as label displayValue?: string, inputValue?: string, screenReaderMessage?: string, focused?: boolean, disabled?: boolean, required?: boolean, showCaret?: boolean, showClearDate?: boolean, onChange?: (e: React.EventHandler>) => void, onClearDate?: (e: React.EventHandler>) => void, onFocus?: (e: React.EventHandler>) => void, onKeyDownShiftTab?: (e: React.EventHandler>) => void, onKeyDownTab?: (e: React.EventHandler>) => void, // i18n phrases?: { clearDate: string | JSX.Element, } } type SingleDatePickerInput = React.ClassicComponentClass; var SingleDatePickerInput: React.ClassicComponentClass; interface DayPickerShape{ enableOutsideDays?: boolean, numberOfMonths?: number, modifiers?: any, orientation?: ScrollableOrientationShape, withPortal?: boolean, hidden?: boolean, initialVisibleMonth?: () => moment.Moment, navPrev?: string | JSX.Element, navNext?: string | JSX.Element, onDayClick?: (day: any, e: React.EventHandler>) => void, onDayMouseEnter?: (day: any, e: React.EventHandler>) => void, onDayMouseLeave?: (day: any, e: React.EventHandler>) => void, onPrevMonthClick?: (e: React.EventHandler>) => void, onNextMonthClick?: (e: React.EventHandler>) => void, onOutsideClick?: (e: MouseEvent) => void, renderDay?: (day: any) => (string | JSX.Element), // i18n monthFormat?: string, } type DayPicker = React.ClassicComponentClass; var DayPicker: React.ClassicComponentClass; interface DayPickerRangeControllerShape{ startDate?: momentPropTypes.momentObj, endDate?: momentPropTypes.momentObj, onDatesChange?: (arg: { startDate: any, endDate: any }) => void, focusedInput?: FocusedInputShape, onFocusChange?: (arg: FocusedInputShape) => void, keepOpenOnDateSelect?: boolean, minimumNights?: number, isOutsideRange?: (day: any) => boolean, isDayBlocked?: (day: any) => boolean, isDayHighlighted?: (day: any) => boolean, // DayPicker props enableOutsideDays?: boolean, numberOfMonths?: number, orientation?: ScrollableOrientationShape, withPortal?: boolean, hidden?: boolean, initialVisibleMonth?: () => moment.Moment, navPrev?: string | JSX.Element, navNext?: string | JSX.Element, onPrevMonthClick?: (e: React.EventHandler>) => void, onNextMonthClick?: (e: React.EventHandler>) => void, onOutsideClick?: (e: MouseEvent) => void, renderDay?: (day: any) => (string | JSX.Element), // i18n monthFormat?: string, } type DayPickerRangeController = React.ClassicComponentClass; var DayPickerRangeController: React.ClassicComponentClass; interface CalendarMonthGridShape{ enableOutsideDays?: boolean, firstVisibleMonthIndex?: number, initialMonth?: momentPropTypes.momentObj, isAnimating?: boolean, numberOfMonths?: number, modifiers?: any, orientation?: ScrollableOrientationShape, onDayClick?: (day: any, e: React.EventHandler>) => void, onDayMouseEnter?: (day: any, e: React.EventHandler>) => void, onDayMouseLeave?: (day: any, e: React.EventHandler>) => void, onMonthTransitionEnd?: ()=> void, renderDay?: (day: any) => (string | JSX.Element), transformValue?: string, // i18n monthFormat?: string, } type CalendarMonthGrid = React.ClassicComponentClass; var CalendarMonthGrid: React.ClassicComponentClass; interface CalendarMonthShape{ month?: momentPropTypes.momentObj, isVisible?: boolean, enableOutsideDays?: boolean, modifiers?: any, orientation?: ScrollableOrientationShape, onDayClick?: (day: any, e: React.EventHandler>) => void, onDayMouseEnter?: (day: any, e: React.EventHandler>) => void, onDayMouseLeave?: (day: any, e: React.EventHandler>) => void, renderDay?: (day: any) => (string | JSX.Element), // i18n monthFormat?: string, } type CalendarMonth = React.ClassicComponentClass; var CalendarMonth: React.ClassicComponentClass; interface CalendarDayShape{ day?: momentPropTypes.momentObj, isOutsideDay?: boolean, modifiers?: any, onDayClick?: (day: any, e: React.EventHandler>) => void, onDayMouseEnter?: (day: any, e: React.EventHandler>) => void, onDayMouseLeave?: (day: any, e: React.EventHandler>) => void, renderDay?: (day: any) => (string | JSX.Element), } type CalendarDay = React.ClassicComponentClass; var CalendarDay: React.ClassicComponentClass; var isInclusivelyAfterDay: (a: moment.Moment, b: moment.Moment) => boolean; var isInclusivelyBeforeDay: (a: moment.Moment, b: moment.Moment) => boolean; var isNextDay: (a: moment.Moment, b: moment.Moment) => boolean; var isSameDay: (a: moment.Moment, b: moment.Moment) => boolean; var toISODateString: (date: moment.MomentInput, currentFormat: moment.MomentFormatSpecification) => string | null; var toLocalizedDateString: (date: moment.MomentInput, currentFormat: moment.MomentFormatSpecification) => string | null; var toMomentObject: (dateString: moment.MomentInput, customFormat: moment.MomentFormatSpecification) => moment.Moment | null; }