What does this MR do?
- Stops using
Date.parse
to 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: https://gitlab.com/gitlab-org/gitlab-ce/commit/4ad43ac3a12902d7ea01dc09f8a361b01c21a0ee. 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
. Because 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 - Tests
-
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