Fix timezone due date picker
What does this MR do?
Closes a ~"Community Contribution" MR !7422 (closed) which needed to be rebased and have some linting errors fixed.
There is a date inconsistency when we instantiate the Date object passing the date as string and we should avoid it as the MDN recommends - https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date
This inconsistency is the reason for the bug described here: https://gitlab.com/gitlab-org/gitlab-ce/issues/24253.
Below, we can see different results according to the use of the string. For example, with dashes, the browser (Chrome) ignores the time zone which results in a wrong date. In order to solve this, we can instantiate the Date object passing the year, month (zeroBased) and day as integer params.
Closes #24253 (closed)
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
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
What are the relevant issue numbers?
Closes #24253 (closed)