mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
@types/react-dates: update to version 16.0.0 (#22520)
* @types/react-dates: add property `noBorder` and `block` * @types/react-dates: update to version 16.0.0
This commit is contained in:
committed by
Mohamed Hegazy
parent
ce78ff9c83
commit
d9413a1afb
23
types/react-dates/index.d.ts
vendored
23
types/react-dates/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for react-dates v12.1.1
|
||||
// Type definitions for react-dates v16.0.0
|
||||
// Project: https://github.com/airbnb/react-dates
|
||||
// Definitions by: Artur Ampilogov <https://github.com/Artur-A>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -49,8 +49,11 @@ declare namespace ReactDates {
|
||||
customInputIcon?: string | JSX.Element,
|
||||
customArrowIcon?: string | JSX.Element,
|
||||
customCloseIcon?: string | JSX.Element,
|
||||
noBorder?: boolean,
|
||||
block?: boolean,
|
||||
|
||||
// calendar presentation and interaction related props
|
||||
renderMonth?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
|
||||
orientation?: OrientationShape,
|
||||
anchorDirection?: AnchorDirectionShape,
|
||||
horizontalMargin?: number,
|
||||
@@ -71,9 +74,11 @@ declare namespace ReactDates {
|
||||
onPrevMonthClick?: (e: React.EventHandler<React.MouseEvent<HTMLSpanElement>>) => void,
|
||||
onNextMonthClick?: (e: React.EventHandler<React.MouseEvent<HTMLSpanElement>>) => void,
|
||||
onClose?: (final: { startDate: momentPropTypes.momentObj, endDate: momentPropTypes.momentObj }) => void,
|
||||
transitionDuration?: number,
|
||||
|
||||
// day presentation and interaction related props
|
||||
renderDay?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
|
||||
renderCalendarDay?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
|
||||
renderDayContents?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
|
||||
minimumNights?: number,
|
||||
enableOutsideDays?: boolean,
|
||||
isDayBlocked?: (day: any) => boolean,
|
||||
@@ -84,6 +89,7 @@ declare namespace ReactDates {
|
||||
// internationalization props
|
||||
displayFormat?: (string | (() => string)),
|
||||
monthFormat?: string,
|
||||
weekDayFormat?: string,
|
||||
phrases?: {
|
||||
closeDatePicker: string,
|
||||
clearDates: string,
|
||||
@@ -137,8 +143,11 @@ declare namespace ReactDates {
|
||||
customCloseIcon?: string | JSX.Element,
|
||||
showDefaultInputIcon?: boolean,
|
||||
customInputIcon?: string | JSX.Element,
|
||||
noBorder?: boolean,
|
||||
block?: boolean,
|
||||
|
||||
// calendar presentation and interaction related props
|
||||
renderMonth?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
|
||||
orientation?: OrientationShape,
|
||||
anchorDirection?: AnchorDirectionShape,
|
||||
horizontalMargin?: number,
|
||||
@@ -151,6 +160,7 @@ declare namespace ReactDates {
|
||||
reopenPickerOnClearDates?: boolean,
|
||||
renderCalendarInfo?: () => (string | JSX.Element),
|
||||
hideKeyboardShortcutsPanel?: boolean,
|
||||
daySize?: number,
|
||||
isRTL?: boolean,
|
||||
|
||||
// navigation related props
|
||||
@@ -159,9 +169,11 @@ declare namespace ReactDates {
|
||||
onPrevMonthClick?: (e: React.EventHandler<React.MouseEvent<HTMLSpanElement>>) => void,
|
||||
onNextMonthClick?: (e: React.EventHandler<React.MouseEvent<HTMLSpanElement>>) => void,
|
||||
onClose?: (final: { startDate: momentPropTypes.momentObj, endDate: momentPropTypes.momentObj }) => void,
|
||||
transitionDuration?: number,
|
||||
|
||||
// day presentation and interaction related props
|
||||
renderDay?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
|
||||
renderCalendarDay?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
|
||||
renderDayContents?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
|
||||
enableOutsideDays?: boolean,
|
||||
isDayBlocked?: (day: any) => boolean,
|
||||
isOutsideRange?: (day: any) => boolean,
|
||||
@@ -224,6 +236,7 @@ declare namespace ReactDates {
|
||||
renderCalendarInfo?: () => (string | JSX.Element),
|
||||
onOutsideClick?: (e: any) => void,
|
||||
keepOpenOnDateSelect?: boolean,
|
||||
noBorder?: boolean,
|
||||
|
||||
// navigation related props
|
||||
navPrev?: string | JSX.Element,
|
||||
@@ -231,9 +244,11 @@ declare namespace ReactDates {
|
||||
hideKeyboardShortcutsPanel?: boolean;
|
||||
onPrevMonthClick?: (e: React.EventHandler<React.MouseEvent<HTMLSpanElement>>) => void,
|
||||
onNextMonthClick?: (e: React.EventHandler<React.MouseEvent<HTMLSpanElement>>) => void,
|
||||
transitionDuration?: number,
|
||||
|
||||
// day presentation and interaction related props
|
||||
renderDay?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
|
||||
renderCalendarDay?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
|
||||
renderDayContents?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
|
||||
minimumNights?: number,
|
||||
isOutsideRange?: (day: any) => boolean,
|
||||
isDayBlocked?: (day: any) => boolean,
|
||||
|
||||
@@ -42,6 +42,8 @@ class SingleDatePickerFullTest extends React.Component {
|
||||
placeholder="test"
|
||||
required={false}
|
||||
showClearDate={true}
|
||||
noBorder={true}
|
||||
block={false}
|
||||
isDayBlocked={(day:any)=> false}
|
||||
isOutsideRange={(day:any)=> false}
|
||||
keepOpenOnDateSelect={true}
|
||||
@@ -61,7 +63,7 @@ class SingleDatePickerFullTest extends React.Component {
|
||||
numberOfMonths={2}
|
||||
orientation="horizontal"
|
||||
monthFormat="MM"
|
||||
renderDay={day => day.toString()}
|
||||
renderDayContents={day => day.toString()}
|
||||
/>
|
||||
}
|
||||
}
|
||||
@@ -90,6 +92,8 @@ class DateRangePickerFullTest extends React.Component {
|
||||
showDefaultInputIcon={true}
|
||||
required={false}
|
||||
showClearDates={true}
|
||||
noBorder={true}
|
||||
block={false}
|
||||
startDate={moment().add(3, 'days')}
|
||||
endDate={moment().add(5, 'days')}
|
||||
anchorDirection="left"
|
||||
@@ -114,7 +118,7 @@ class DateRangePickerFullTest extends React.Component {
|
||||
numberOfMonths={2}
|
||||
orientation="horizontal"
|
||||
monthFormat="MM"
|
||||
renderDay={day => day.toString()}
|
||||
renderDayContents={day => day.toString()}
|
||||
/>
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user