diff --git a/calendar/js/et2_widget_timegrid.js b/calendar/js/et2_widget_timegrid.js index 0e33776fa3..ac79ae3fb1 100644 --- a/calendar/js/et2_widget_timegrid.js +++ b/calendar/js/et2_widget_timegrid.js @@ -1600,7 +1600,7 @@ var et2_calendar_timegrid = /** @class */ (function (_super) { } this.div.off('mousemove.dragcreate'); this.gridHover.css('cursor', ''); - return this._drag_create_end(end); + return this._drag_create_end(this.drag_create.event ? end : undefined); }; /** * Get time from position for drag and drop diff --git a/calendar/js/et2_widget_timegrid.ts b/calendar/js/et2_widget_timegrid.ts index f806426de2..186f8c9b6f 100644 --- a/calendar/js/et2_widget_timegrid.ts +++ b/calendar/js/et2_widget_timegrid.ts @@ -2101,7 +2101,7 @@ export class et2_calendar_timegrid extends et2_calendar_view implements et2_IDet this.div.off('mousemove.dragcreate'); this.gridHover.css('cursor', ''); - return this._drag_create_end(end); + return this._drag_create_end( this.drag_create.event ? end : undefined); } /**