@@ -27,32 +27,13 @@ export default class DatePickerRange extends Component {
27
27
}
28
28
29
29
DatePickerRange . propTypes = {
30
- /**
31
- * The ID of this component, used to identify dash components
32
- * in callbacks. The ID needs to be unique across all of the
33
- * components in an app.
34
- */
35
- id : PropTypes . string ,
36
-
37
30
/**
38
31
* Specifies the starting date for the component.
39
32
* Accepts datetime.datetime objects or strings
40
33
* in the format 'YYYY-MM-DD'
41
34
*/
42
35
start_date : PropTypes . string ,
43
36
44
- /**
45
- * The HTML element ID of the start date input field.
46
- * Not used by Dash, only by CSS.
47
- */
48
- start_date_id : PropTypes . string ,
49
-
50
- /**
51
- * The HTML element ID of the end date input field.
52
- * Not used by Dash, only by CSS.
53
- */
54
- end_date_id : PropTypes . string ,
55
-
56
37
/**
57
38
* Specifies the ending date for the component.
58
39
* Accepts datetime.datetime objects or strings
@@ -82,12 +63,20 @@ DatePickerRange.propTypes = {
82
63
disabled_days : PropTypes . arrayOf ( PropTypes . string ) ,
83
64
84
65
/**
85
- * Specifies the month that is initially presented when the user
86
- * opens the calendar. Accepts datetime.datetime objects or strings
87
- * in the format 'YYYY-MM-DD'
88
- *
66
+ * Specifies a minimum number of nights that must be selected between
67
+ * the startDate and the endDate
89
68
*/
90
- initial_visible_month : PropTypes . string ,
69
+ minimum_nights : PropTypes . number ,
70
+
71
+ /**
72
+ * Determines when the component should update
73
+ * its value. If `bothdates`, then the DatePicker
74
+ * will only trigger its value when the user has
75
+ * finished picking both dates. If `singledate`, then
76
+ * the DatePicker will update its value
77
+ * as one date is picked.
78
+ */
79
+ updatemode : PropTypes . oneOf ( [ 'singledate' , 'bothdates' ] ) ,
91
80
92
81
/**
93
82
* Text that will be displayed in the first input
@@ -102,45 +91,43 @@ DatePickerRange.propTypes = {
102
91
end_date_placeholder_text : PropTypes . string ,
103
92
104
93
/**
105
- * Size of rendered calendar days, higher number
106
- * means bigger day size and larger calendar overall
107
- */
108
- day_size : PropTypes . number ,
109
-
110
- /**
111
- * Orientation of calendar, either vertical or horizontal.
112
- * Valid options are 'vertical' or 'horizontal'.
94
+ * Specifies the month that is initially presented when the user
95
+ * opens the calendar. Accepts datetime.datetime objects or strings
96
+ * in the format 'YYYY-MM-DD'
97
+ *
113
98
*/
114
- calendar_orientation : PropTypes . oneOf ( [ 'vertical' , 'horizontal' ] ) ,
99
+ initial_visible_month : PropTypes . string ,
115
100
116
101
/**
117
- * Determines whether the calendar and days operate
118
- * from left to right or from right to left
102
+ * Whether or not the dropdown is "clearable", that is, whether or
103
+ * not a small "x" appears on the right of the dropdown that removes
104
+ * the selected value.
119
105
*/
120
- is_RTL : PropTypes . bool ,
106
+ clearable : PropTypes . bool ,
121
107
122
108
/**
123
109
* If True, the calendar will automatically open when cleared
124
110
*/
125
111
reopen_calendar_on_clear : PropTypes . bool ,
126
112
127
113
/**
128
- * Number of calendar months that are shown when calendar is opened
129
- */
130
- number_of_months_shown : PropTypes . number ,
131
-
132
- /**
133
- * If True, calendar will open in a screen overlay portal,
134
- * not supported on vertical calendar
114
+ * Specifies the format that the selected dates will be displayed
115
+ * valid formats are variations of "MM YY DD". For example:
116
+ * "MM YY DD" renders as '05 10 97' for May 10th 1997
117
+ * "MMMM, YY" renders as 'May, 1997' for May 10th 1997
118
+ * "M, D, YYYY" renders as '07, 10, 1997' for September 10th 1997
119
+ * "MMMM" renders as 'May' for May 10 1997
135
120
*/
136
- with_portal : PropTypes . bool ,
121
+ display_format : PropTypes . string ,
137
122
138
123
/**
139
- * If True, calendar will open in a full screen overlay portal, will
140
- * take precedent over 'withPortal' if both are set to true,
141
- * not supported on vertical calendar
124
+ * Specifies the format that the month will be displayed in the calendar,
125
+ * valid formats are variations of "MM YY". For example:
126
+ * "MM YY" renders as '05 97' for May 1997
127
+ * "MMMM, YYYY" renders as 'May, 1997' for May 1997
128
+ * "MMM, YY" renders as 'Sep, 97' for September 1997
142
129
*/
143
- with_full_screen_portal : PropTypes . bool ,
130
+ month_format : PropTypes . string ,
144
131
145
132
/**
146
133
* Specifies what day is the first day of the week, values must be
@@ -149,10 +136,10 @@ DatePickerRange.propTypes = {
149
136
first_day_of_week : PropTypes . oneOf ( [ 0 , 1 , 2 , 3 , 4 , 5 , 6 ] ) ,
150
137
151
138
/**
152
- * Specifies a minimum number of nights that must be selected between
153
- * the startDate and the endDate
139
+ * If True the calendar will display days that rollover into
140
+ * the next month
154
141
*/
155
- minimum_nights : PropTypes . number ,
142
+ show_outside_days : PropTypes . bool ,
156
143
157
144
/**
158
145
* If True the calendar will not close when the user has selected a value
@@ -161,46 +148,57 @@ DatePickerRange.propTypes = {
161
148
stay_open_on_select : PropTypes . bool ,
162
149
163
150
/**
164
- * If True the calendar will display days that rollover into
165
- * the next month
151
+ * Orientation of calendar, either vertical or horizontal.
152
+ * Valid options are 'vertical' or 'horizontal'.
166
153
*/
167
- show_outside_days : PropTypes . bool ,
154
+ calendar_orientation : PropTypes . oneOf ( [ 'vertical' , 'horizontal' ] ) ,
168
155
169
156
/**
170
- * Specifies the format that the month will be displayed in the calendar,
171
- * valid formats are variations of "MM YY". For example:
172
- * "MM YY" renders as '05 97' for May 1997
173
- * "MMMM, YYYY" renders as 'May, 1997' for May 1997
174
- * "MMM, YY" renders as 'Sep, 97' for September 1997
157
+ * Number of calendar months that are shown when calendar is opened
175
158
*/
176
- month_format : PropTypes . string ,
159
+ number_of_months_shown : PropTypes . number ,
177
160
178
161
/**
179
- * Specifies the format that the selected dates will be displayed
180
- * valid formats are variations of "MM YY DD". For example:
181
- * "MM YY DD" renders as '05 10 97' for May 10th 1997
182
- * "MMMM, YY" renders as 'May, 1997' for May 10th 1997
183
- * "M, D, YYYY" renders as '07, 10, 1997' for September 10th 1997
184
- * "MMMM" renders as 'May' for May 10 1997
162
+ * If True, calendar will open in a screen overlay portal,
163
+ * not supported on vertical calendar
185
164
*/
186
- display_format : PropTypes . string ,
165
+ with_portal : PropTypes . bool ,
166
+
167
+ /**
168
+ * If True, calendar will open in a full screen overlay portal, will
169
+ * take precedent over 'withPortal' if both are set to true,
170
+ * not supported on vertical calendar
171
+ */
172
+ with_full_screen_portal : PropTypes . bool ,
173
+
174
+ /**
175
+ * Size of rendered calendar days, higher number
176
+ * means bigger day size and larger calendar overall
177
+ */
178
+ day_size : PropTypes . number ,
179
+
180
+ /**
181
+ * Determines whether the calendar and days operate
182
+ * from left to right or from right to left
183
+ */
184
+ is_RTL : PropTypes . bool ,
187
185
188
186
/**
189
187
* If True, no dates can be selected.
190
188
*/
191
189
disabled : PropTypes . bool ,
192
190
193
191
/**
194
- * Whether or not the dropdown is "clearable", that is, whether or
195
- * not a small "x" appears on the right of the dropdown that removes
196
- * the selected value.
192
+ * The HTML element ID of the start date input field.
193
+ * Not used by Dash, only by CSS.
197
194
*/
198
- clearable : PropTypes . bool ,
195
+ start_date_id : PropTypes . string ,
199
196
200
197
/**
201
- * Dash-assigned callback that gets fired when the value changes.
198
+ * The HTML element ID of the end date input field.
199
+ * Not used by Dash, only by CSS.
202
200
*/
203
- setProps : PropTypes . func ,
201
+ end_date_id : PropTypes . string ,
204
202
205
203
/**
206
204
* CSS styles appended to wrapper div
@@ -213,14 +211,16 @@ DatePickerRange.propTypes = {
213
211
className : PropTypes . string ,
214
212
215
213
/**
216
- * Determines when the component should update
217
- * its value. If `bothdates`, then the DatePicker
218
- * will only trigger its value when the user has
219
- * finished picking both dates. If `singledate`, then
220
- * the DatePicker will update its value
221
- * as one date is picked.
214
+ * The ID of this component, used to identify dash components
215
+ * in callbacks. The ID needs to be unique across all of the
216
+ * components in an app.
222
217
*/
223
- updatemode : PropTypes . oneOf ( [ 'singledate' , 'bothdates' ] ) ,
218
+ id : PropTypes . string ,
219
+
220
+ /**
221
+ * Dash-assigned callback that gets fired when the value changes.
222
+ */
223
+ setProps : PropTypes . func ,
224
224
225
225
/**
226
226
* Object that holds the loading state object coming from dash-renderer
0 commit comments