From a519c6aa0d9d19e95a07545f7386fea4e8cef6f2 Mon Sep 17 00:00:00 2001 From: Joel Birch Date: Sun, 15 Oct 2017 12:23:41 +1100 Subject: [PATCH] Safari requires the date supplied to have a 'T' character rather than a space. Otherwise, the countdown shows NaN for each value. --- src/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.vue b/src/index.vue index e583734..8499fe2 100644 --- a/src/index.vue +++ b/src/index.vue @@ -38,7 +38,7 @@ export default { name: 'ni-countdown', computed: { usableDate () { - return Math.trunc(Date.parse(this.date) / 1000) + return Math.trunc(Date.parse(this.date.replace(/\s/, 'T')) / 1000) }, seconds () { return (this.usableDate - this.now) % 60