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; }