Skip to content

Fix timezone due date picker

username-removed-636429 requested to merge fix-timezone-due-date-picker into master

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. Screen_Shot_2016-11-11_at_11.46.19

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?

What are the relevant issue numbers?

Closes #24253 (closed)

Merge request reports