Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2017-09-02 08:34:27 +0300
committerGitHub <noreply@github.com>2017-09-02 08:34:27 +0300
commita462d06c24e70d40e9091d24c0af82f286142c51 (patch)
tree1a18a06ca0d06fc852560dcc46dc015041cd8ac1 /js
parent490426bbf0b72d836bf41f5af6fcfd4ab9a3e1f0 (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')
-rw-r--r--js/vote.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/vote.js b/js/vote.js
index c1d8ff92..9a6f6fc3 100644
--- a/js/vote.js
+++ b/js/vote.js
@@ -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;