Skip to content

Build your personal knowledge base with Trilium Notes

fix date parsing in local timezone, closes #845

zadam6e060b87b8e9
diff --git a/package-lock.json b/package-lock.json
index e8e6bc4fec..526e39421c 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 4e3fe63e21..22076d3dd1 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());