From fe77f2c14ca722f5f2a1df9eab882a7aca4a5382 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 28 Sep 2023 09:01:09 +0300 Subject: [PATCH] calendar fix update event rendering --- .../crm/src/views/calendar/calendar.js | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/client/modules/crm/src/views/calendar/calendar.js b/client/modules/crm/src/views/calendar/calendar.js index 1854f6f708..d2b2825b30 100644 --- a/client/modules/crm/src/views/calendar/calendar.js +++ b/client/modules/crm/src/views/calendar/calendar.js @@ -1181,24 +1181,18 @@ class CalendarView extends View { * @param {Object.} props */ applyPropsToEvent(event, props) { + if ('start' in props) { + event.setDates(props.start, props.end, {allDay: props.allDay}); + } + for (const key in props) { const value = props[key]; - if (key === 'start') { - event.setStart(value); - - continue; - } - - if (key === 'end') { - event.setEnd(value); - - continue; - } - - if (key === 'allDay') { - event.setAllDay(value); - + if ( + key === 'start' || + key === 'end' || + key === 'allDay' + ) { continue; }