Closed matthew-white closed 9 months ago
This issue hasn't been a priority for multiple years, so I think it's safe to close it. I also think it's possible that we'll move to a different date range picker at some point (if we move away from Bootstrap).
We want to add an icon inside the
DateRangePicker
component that when clicked will toggle the flatpickr calendar. I think this can be done by calling thetoggle()
method of the flatpickr instance or by using an external element.The icon should match what is shown for a select element. Right now we show native select elements, which vary across browsers:
Chrome
Firefox
Safari
In order for the
DateRangePicker
icon to match a select element, we will need to either:DateRangePicker
(perhaps using the flatpickrpositionElement
option).DateRangePicker
(probably eitherarrow-down
orchevron-down
).Note that if the
required
prop of aDateRangePicker
component isfalse
, we show a clear button within the component once a selection has been made:When we add the toggle icon, the toggle icon should appear on the right. The clear icon should appear to the left of the toggle icon when it is shown.
The fact that we are showing two icons makes me think that it would be best to implement option (2) above, so that the two icons are styled similarly.