Fix Safari displaying NaN for selected due date
What does this MR do?
- Stops using
Date.parseto parse selected due dates.
- Refactors DueDateSelectors to be more maintainable and readable
Are there points in the code the reviewer needs to double check?
To review the actual fix, look here: 4ad43ac3. It would be difficult to pick out from the overall diff.
Why was this MR needed?
In Safari, the due date selector was displaying 'NaN' when a date is selected, which was being returned by
Date.parse is implemented differently across browsers it's generally recommended to favor implicit Date parsing with the
Date constructor. For more background on this, see MDN on Date.parse.
Also, the code for DueDateSelector was pretty messy, and its logic was very tightly coupled, so I refactored it. None of the basic logic changed, I just broke it up into smaller pieces and made it more OO.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
- CHANGELOG entry added
- Documentation created/updated
- API support added
- Added for this feature/bug
- All builds are passing
- Conform by the merge request performance guides
- Conform by the style guides
Branch has no merge conflicts with
master(if it does - rebase it please)
- Squashed related commits together
What are the relevant issue numbers?
Closes #22984 (closed)