gitlab-org--gitlab-foss/app
Rémy Coutable 0f5c31d59b Merge branch 'safari-is-baNaNas' into 'master'
Fix Safari displaying NaN for selected due date

## What does this MR do?

1. Stops using `Date.parse` to parse selected due dates. 
2. 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:** 4ad43ac3a1. 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](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/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. 

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/22984

See merge request !6797
2016-10-17 12:51:09 +00:00
..
assets Merge branch 'safari-is-baNaNas' into 'master' 2016-10-17 12:51:09 +00:00
controllers Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce 2016-10-15 10:51:16 -04:00
finders Precalculate trending projects 2016-10-10 12:27:08 +02:00
helpers Merge branch 'feature/issues-board' into 'master' 2016-10-13 14:21:14 +00:00
mailers change determine conditions 2016-10-03 18:07:28 +08:00
models Add Pipeline metrics worker 2016-10-17 08:54:33 +02:00
policies Make guests unable to view MRs 2016-10-11 16:51:26 +03:00
services Merge branch 'feature/process-pipeline-hooks-asynchronously' into 'master' 2016-10-14 16:48:42 +00:00
uploaders
validators Add `robots.txt` to the list of reserved namespaces 2016-10-11 02:58:26 +01:00
views Convert due_date_select.js filetype to es6. 2016-10-17 11:58:03 +02:00
workers Improve spec for pipeline metrics worker 2016-10-17 10:27:53 +02:00