From edc9d00be34bbba3145552d58f827c02e67c66cc Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 20 May 2024 11:41:31 +0300 Subject: [PATCH] calendar all day fix --- client/modules/crm/src/views/calendar/calendar.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client/modules/crm/src/views/calendar/calendar.js b/client/modules/crm/src/views/calendar/calendar.js index 17cf166b4b..c1165d11e3 100644 --- a/client/modules/crm/src/views/calendar/calendar.js +++ b/client/modules/crm/src/views/calendar/calendar.js @@ -624,8 +624,8 @@ class CalendarView extends View { if (this.allDayScopeList.includes(event.scope)) { event.allDay = event.allDayCopy = true; - if (!notInitial && end) { - start = end; + if (/*!notInitial &&*/ end) { + start = end.clone(); if ( !event.dateEndDate && @@ -636,6 +636,10 @@ class CalendarView extends View { } } + if (start.isSame(end)) { + end.add(1, 'days'); + } + if (start) { event.start = start.toDate(); }