1 | import PropTypes from 'prop-types';
|
2 | import momentPropTypes from 'react-moment-proptypes';
|
3 | import { mutuallyExclusiveProps, nonNegativeInteger } from 'airbnb-prop-types';
|
4 |
|
5 | import { DateRangePickerPhrases } from '../defaultPhrases';
|
6 | import getPhrasePropTypes from '../utils/getPhrasePropTypes';
|
7 |
|
8 | import FocusedInputShape from './FocusedInputShape';
|
9 | import IconPositionShape from './IconPositionShape';
|
10 | import OrientationShape from './OrientationShape';
|
11 | import DisabledShape from './DisabledShape';
|
12 | import anchorDirectionShape from './AnchorDirectionShape';
|
13 | import openDirectionShape from './OpenDirectionShape';
|
14 | import DayOfWeekShape from './DayOfWeekShape';
|
15 | import CalendarInfoPositionShape from './CalendarInfoPositionShape';
|
16 |
|
17 | export default {
|
18 |
|
19 | startDate: momentPropTypes.momentObj,
|
20 | endDate: momentPropTypes.momentObj,
|
21 | onDatesChange: PropTypes.func.isRequired,
|
22 |
|
23 | focusedInput: FocusedInputShape,
|
24 | onFocusChange: PropTypes.func.isRequired,
|
25 |
|
26 | onClose: PropTypes.func,
|
27 |
|
28 |
|
29 | startDateId: PropTypes.string.isRequired,
|
30 | startDatePlaceholderText: PropTypes.string,
|
31 | startDateOffset: PropTypes.func,
|
32 | endDateOffset: PropTypes.func,
|
33 | endDateId: PropTypes.string.isRequired,
|
34 | endDatePlaceholderText: PropTypes.string,
|
35 | startDateAriaLabel: PropTypes.string,
|
36 | endDateAriaLabel: PropTypes.string,
|
37 | disabled: DisabledShape,
|
38 | required: PropTypes.bool,
|
39 | readOnly: PropTypes.bool,
|
40 | screenReaderInputMessage: PropTypes.string,
|
41 | showClearDates: PropTypes.bool,
|
42 | showDefaultInputIcon: PropTypes.bool,
|
43 | inputIconPosition: IconPositionShape,
|
44 | customInputIcon: PropTypes.node,
|
45 | customArrowIcon: PropTypes.node,
|
46 | customCloseIcon: PropTypes.node,
|
47 | noBorder: PropTypes.bool,
|
48 | block: PropTypes.bool,
|
49 | small: PropTypes.bool,
|
50 | regular: PropTypes.bool,
|
51 | keepFocusOnInput: PropTypes.bool,
|
52 |
|
53 |
|
54 | renderMonthText: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'),
|
55 | renderMonthElement: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'),
|
56 | renderWeekHeaderElement: PropTypes.func,
|
57 | orientation: OrientationShape,
|
58 | anchorDirection: anchorDirectionShape,
|
59 | openDirection: openDirectionShape,
|
60 | horizontalMargin: PropTypes.number,
|
61 | withPortal: PropTypes.bool,
|
62 | withFullScreenPortal: PropTypes.bool,
|
63 | appendToBody: PropTypes.bool,
|
64 | disableScroll: PropTypes.bool,
|
65 | daySize: nonNegativeInteger,
|
66 | isRTL: PropTypes.bool,
|
67 | firstDayOfWeek: DayOfWeekShape,
|
68 | initialVisibleMonth: PropTypes.func,
|
69 | numberOfMonths: PropTypes.number,
|
70 | keepOpenOnDateSelect: PropTypes.bool,
|
71 | reopenPickerOnClearDates: PropTypes.bool,
|
72 | renderCalendarInfo: PropTypes.func,
|
73 | calendarInfoPosition: CalendarInfoPositionShape,
|
74 | hideKeyboardShortcutsPanel: PropTypes.bool,
|
75 | verticalHeight: nonNegativeInteger,
|
76 | transitionDuration: nonNegativeInteger,
|
77 | verticalSpacing: nonNegativeInteger,
|
78 | horizontalMonthPadding: nonNegativeInteger,
|
79 |
|
80 |
|
81 | navPrev: PropTypes.node,
|
82 | navNext: PropTypes.node,
|
83 | onPrevMonthClick: PropTypes.func,
|
84 | onNextMonthClick: PropTypes.func,
|
85 |
|
86 |
|
87 | renderCalendarDay: PropTypes.func,
|
88 | renderDayContents: PropTypes.func,
|
89 | minimumNights: PropTypes.number,
|
90 | enableOutsideDays: PropTypes.bool,
|
91 | isDayBlocked: PropTypes.func,
|
92 | isOutsideRange: PropTypes.func,
|
93 | isDayHighlighted: PropTypes.func,
|
94 |
|
95 |
|
96 | displayFormat: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
97 | monthFormat: PropTypes.string,
|
98 | weekDayFormat: PropTypes.string,
|
99 | phrases: PropTypes.shape(getPhrasePropTypes(DateRangePickerPhrases)),
|
100 | dayAriaLabelFormat: PropTypes.string,
|
101 | };
|