diff options
author | dartcafe <github@dartcafe.de> | 2017-09-02 08:34:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-02 08:34:27 +0300 |
commit | a462d06c24e70d40e9091d24c0af82f286142c51 (patch) | |
tree | 1a18a06ca0d06fc852560dcc46dc015041cd8ac1 /js/vote.js | |
parent | 490426bbf0b72d836bf41f5af6fcfd4ab9a3e1f0 (diff) |
Fix date display in IE and Safari (NaN)
IE and Safari couldn't interprate the date format correctly. This patch corrects the display on common browsers.
Diffstat (limited to 'js/vote.js')
-rw-r--r-- | js/vote.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -19,7 +19,7 @@ $(document).ready(function () { var prev = ''; var dateStr = ''; $('.hidden-dates').each(function(i, obj) { - var exDt = new Date(obj.value+'+0000'); // add +0000 = UTC + var exDt = new Date(obj.value.replace(/ /g,"T")+"Z"); var day = ('0' + exDt.getDate()).substr(-2); var month = ('0' + (exDt.getMonth()+1)).substr(-2); var day_month = day + '.' + month; |