From a389ca46a29d2c96189e07de3a73b537445fa644 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Mon, 25 Feb 2019 11:32:29 +0100 Subject: [PATCH] calendar offset --- front/core/components/calendar/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/front/core/components/calendar/index.js b/front/core/components/calendar/index.js index de03a70c9..dfc69d837 100644 --- a/front/core/components/calendar/index.js +++ b/front/core/components/calendar/index.js @@ -93,7 +93,7 @@ export default class Calendar extends Component { } applyOffset(date) { - // date.setTime(date.getTime() - date.getTimezoneOffset() * 60000); + date.setTime(date.getTime() - date.getTimezoneOffset() * 60000); } repaint() { @@ -133,11 +133,13 @@ export default class Calendar extends Component { date.getFullYear(), date.getMonth(), day); - this.applyOffset(newDate); let event = this.events.find(event => { return event.date >= newDate && event.date <= newDate; }); + console.log(this.events); + console.log(newDate); + /* if (curDate >= newDate && curDate <= newDate) color = 'orange'; */