Skip to content

Commit b1214ca

Browse files
authored
Merge pull request #5156 from fikzzzy/update-datepicker
Improve Datepicker
2 parents 12adaec + 0cd9e05 commit b1214ca

File tree

11 files changed

+11450
-219
lines changed

11 files changed

+11450
-219
lines changed

__tests__/shared/components/challenge-listing/Filters/__snapshots__/FiltersPanel.jsx.snap

+24-54
Original file line numberDiff line numberDiff line change
@@ -140,39 +140,24 @@ exports[`Matches shallow shapshot 1`] = `
140140
/>
141141
</div>
142142
<div
143-
className="src-shared-components-challenge-listing-Filters-FiltersPanel-___style__filter___1-QUz src-shared-components-challenge-listing-Filters-FiltersPanel-___style__dates___3kH3c src-shared-components-challenge-listing-Filters-FiltersPanel-___style__hidetwomonthdatepicker___OurWT"
143+
className="src-shared-components-challenge-listing-Filters-FiltersPanel-___style__filter___1-QUz src-shared-components-challenge-listing-Filters-FiltersPanel-___style__dates___3kH3c"
144144
>
145145
<label
146-
htmlFor="date-range-picker-one-month"
146+
htmlFor="input-start-date-range"
147147
>
148148
Date range
149-
<input
150-
type="hidden"
151-
/>
152149
</label>
153150
<DateRangePicker
154-
id="date-range-picker-one-month"
155-
numberOfMonths={1}
156-
onDatesChange={[Function]}
157-
readOnly={true}
158-
/>
159-
</div>
160-
<div
161-
className="src-shared-components-challenge-listing-Filters-FiltersPanel-___style__filter___1-QUz src-shared-components-challenge-listing-Filters-FiltersPanel-___style__dates___3kH3c src-shared-components-challenge-listing-Filters-FiltersPanel-___style__hideonemonthdatepicker___2zdTb"
162-
>
163-
<label
164-
htmlFor="date-range-picker-two-months"
165-
>
166-
Date range
167-
<input
168-
type="hidden"
169-
/>
170-
</label>
171-
<DateRangePicker
172-
id="date-range-picker-two-months"
173-
numberOfMonths={2}
174-
onDatesChange={[Function]}
175-
readOnly={true}
151+
endDatePlaceholder="End Date"
152+
onChange={[Function]}
153+
range={
154+
Object {
155+
"endDate": null,
156+
"startDate": null,
157+
}
158+
}
159+
readOnly={false}
160+
startDatePlaceholder="Start Date"
176161
/>
177162
</div>
178163
</div>
@@ -325,39 +310,24 @@ exports[`Matches shallow shapshot 2`] = `
325310
/>
326311
</div>
327312
<div
328-
className="src-shared-components-challenge-listing-Filters-FiltersPanel-___style__filter___1-QUz src-shared-components-challenge-listing-Filters-FiltersPanel-___style__dates___3kH3c src-shared-components-challenge-listing-Filters-FiltersPanel-___style__hidetwomonthdatepicker___OurWT"
313+
className="src-shared-components-challenge-listing-Filters-FiltersPanel-___style__filter___1-QUz src-shared-components-challenge-listing-Filters-FiltersPanel-___style__dates___3kH3c"
329314
>
330315
<label
331-
htmlFor="date-range-picker-one-month"
316+
htmlFor="input-start-date-range"
332317
>
333318
Date range
334-
<input
335-
type="hidden"
336-
/>
337319
</label>
338320
<DateRangePicker
339-
id="date-range-picker-one-month"
340-
numberOfMonths={1}
341-
onDatesChange={[Function]}
342-
readOnly={true}
343-
/>
344-
</div>
345-
<div
346-
className="src-shared-components-challenge-listing-Filters-FiltersPanel-___style__filter___1-QUz src-shared-components-challenge-listing-Filters-FiltersPanel-___style__dates___3kH3c src-shared-components-challenge-listing-Filters-FiltersPanel-___style__hideonemonthdatepicker___2zdTb"
347-
>
348-
<label
349-
htmlFor="date-range-picker-two-months"
350-
>
351-
Date range
352-
<input
353-
type="hidden"
354-
/>
355-
</label>
356-
<DateRangePicker
357-
id="date-range-picker-two-months"
358-
numberOfMonths={2}
359-
onDatesChange={[Function]}
360-
readOnly={true}
321+
endDatePlaceholder="End Date"
322+
onChange={[Function]}
323+
range={
324+
Object {
325+
"endDate": null,
326+
"startDate": null,
327+
}
328+
}
329+
readOnly={false}
330+
startDatePlaceholder="Start Date"
361331
/>
362332
</div>
363333
</div>

0 commit comments

Comments
 (0)