From 6f980c92dba175e9ecbd3146c06d059bb1b0cf25 Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 30 Aug 2016 08:30:48 -0600 Subject: [PATCH] Update parent when removing events out of normal work times --- calendar/js/et2_widget_event.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/calendar/js/et2_widget_event.js b/calendar/js/et2_widget_event.js index a5672c433d..aca66c517b 100644 --- a/calendar/js/et2_widget_event.js +++ b/calendar/js/et2_widget_event.js @@ -195,6 +195,14 @@ var et2_calendar_event = (function(){ "use strict"; return et2_valueWidget.exten // Check for changing days in the grid view if(!this._sameday_check(value)) { + // May need to update parent to remove out-of-view events + var parent = this._parent; + this._parent.removeChild(this); + if(event === null && parent && parent._out_of_view) + { + parent._out_of_view(); + } + // This should now cease to exist, as new events have been created this.free(); return;