From 563e5ba02440d860008c419f8f783c5e1cadb7e9 Mon Sep 17 00:00:00 2001 From: mohammadamer Date: Mon, 22 Nov 2021 21:18:49 +0200 Subject: [PATCH] Fix All Day event issue Fix All Day event issue that makes All Day events date expanded to another day instead of being full day event. --- .../src/services/parseRecurrentEvent.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/samples/react-calendar/src/services/parseRecurrentEvent.ts b/samples/react-calendar/src/services/parseRecurrentEvent.ts index d459862aa..f7f131e01 100644 --- a/samples/react-calendar/src/services/parseRecurrentEvent.ts +++ b/samples/react-calendar/src/services/parseRecurrentEvent.ts @@ -52,21 +52,13 @@ export default class parseRecurrentEvent { return str.split(' '); } - public parseDate(date: any, allDay: any) { if (typeof date == 'string') { - if (allDay) { - if (date.lastIndexOf('Z') == date.length - 1) { - const dt = date.substring(0, date.length - 1); - return new Date(dt); - } - } - else { - return new Date(date); - } + return new Date(date); } return date; } + public parseEvent(e: any, start: any, end: any) { if (e.fRecurrence == '0' || e.fRecurrence == '4') { e.EventDate = new Date(this.parseDate(e.EventDate, e.fAllDayEvent));