forked from carbon-design-system/carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(date-picker): prevent range inputs from clearing prematurely (car…
…bon-design-system#10603) ### Related Ticket(s) carbon-design-system/carbon-for-ibm-dotcom#10501 https://jsw.ibm.com/browse/ADCMS-3429 Upstream flatpickr tickets / PRs - flatpickr/flatpickr#2801 - flatpickr/flatpickr#2918 ### Description Fixes bugs with the date picker. Specifically we fix the reported bug where bluring from the input after a range selection would clear the first input. We then end up fixing a couple of other related bugs to get us back to a usable range input. Notably the usability issue reported wherin there ends up being a lot of month paging for far-past or far-future ranges to get a complete range is not addressed here, as that behavior is by design. Note that, as dicussed with @IgnacioBecerra, @kennylam and @andy-blum at office hours, the underlying [flatpickr](https://github.com/flatpickr/flatpickr) library is not seeing a concerted effort at maintenance. There are many bug reports piled up in their issue queue ([over 600 at time of writing](https://github.com/flatpickr/flatpickr/issues)) and not much commit activity or late. As a result, here I've updated to the latest tagged version of flatpickr (4.6.13), and then used [`yarn patch`](https://yarnpkg.com/cli/patch) to include necessary bug fixes. Upstream PR's and issues are linked above. ### Changelog **Changed** - date picker with range: fix a bug with date picker where bluring away from the first input after having populated a range value, would clear the first input - date picker with range: fix a bug where loosing focus from the calendar picker after having populated a range value, would clear the first input - date picker with range: fix a bug where clicking either input after having set a range would not show the selected range set in the calendar
- Loading branch information
Showing
3 changed files
with
105 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters