diff options
author | Bryce Johnson <bryce@gitlab.com> | 2016-10-11 11:18:36 +0300 |
---|---|---|
committer | Bryce Johnson <bryce@gitlab.com> | 2016-10-17 12:58:03 +0300 |
commit | 89bb889c4541a477aff4202fd6dad23ad3fe38d6 (patch) | |
tree | c31143221ed65ed43f74de1113273c2a57a9317f /app/assets/javascripts/due_date_select.js | |
parent | 052de0600c6b137e6f9df08250b4cf5f38280295 (diff) |
Stop directly parsing due_date with Date.parse, prefer parsing implicitly.
Diffstat (limited to 'app/assets/javascripts/due_date_select.js')
-rw-r--r-- | app/assets/javascripts/due_date_select.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/due_date_select.js b/app/assets/javascripts/due_date_select.js index bf68b7e3a9b..0fcf0823d4e 100644 --- a/app/assets/javascripts/due_date_select.js +++ b/app/assets/javascripts/due_date_select.js @@ -43,7 +43,7 @@ // Create the post date value = $("input[name='" + fieldName + "']").val(); if (value !== '') { - date = new Date(value.replace(new RegExp('-', 'g'), ',')); + date = new Date(value); mediumDate = $.datepicker.formatDate('M d, yy', date); } else { mediumDate = 'No due date'; @@ -64,7 +64,7 @@ $selectbox.hide(); } $value.css('display', ''); - cssClass = Date.parse(mediumDate) ? 'bold' : 'no-value'; + cssClass = new Date(mediumDate) ? 'bold' : 'no-value'; $valueContent.html("<span class='" + cssClass + "'>" + mediumDate + "</span>"); $sidebarValue.html(mediumDate); if (value !== '') { |