From 6e060b87b8e9d1889037b177d3bd988635ddcab0 Mon Sep 17 00:00:00 2001 From: zadam Date: Sat, 1 Feb 2020 09:29:56 +0100 Subject: [PATCH] fix date parsing in local timezone, closes #845 --- package-lock.json | 2 +- src/public/javascripts/widgets/calendar.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index e8e6bc4fe..526e39421 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "trilium", - "version": "0.40.0-beta", + "version": "0.40.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/public/javascripts/widgets/calendar.js b/src/public/javascripts/widgets/calendar.js index 4e3fe63e2..22076d3dd 100644 --- a/src/public/javascripts/widgets/calendar.js +++ b/src/public/javascripts/widgets/calendar.js @@ -41,7 +41,7 @@ class CalendarWidget extends StandardWidget { } init($el, activeDate) { - this.activeDate = new Date(Date.parse(activeDate)); + this.activeDate = new Date(activeDate + "T12:00:00"); // attaching time fixes local timezone handling this.todaysDate = new Date(); this.date = new Date(this.activeDate.getTime());