Event disappears after custom dialog window closes

Basically I created my own dialog window for when editing an event. I attached a function to the onDblClick event by using scheduler.attachEvent and passing the desired event and the function.

The function opens a window which handles the required update operations. When I close it, the event that I just double-clicked on has disappeared from the scheduler.

That took me by surprise. The dialog window doesn’t manipulate the scheduler events directly, it just allows a user to change some information which is packaged and sent to the server for approval, upon submisison or canceling, it just removes itself and returns the user back to the scheduler. The underlying event on the scheduler is not changed in anyway, why does it disappear from view? Am I missing some extra steps such as refreshing?

Appreciate your advice.

Not quite sure why is event disappearing, but you can try to call

scheduler.event_updated(scheduler.getEvent(id));

Be sure that your custom form doesn’t break start and end dates of the event - if they was set incorrect ( both have the same value, or end date is smaller than start date - event will disappear from the view, as in your case )

Thank you for the hint, it lead me to a code line that was accidentally overwriting the event’s dates and causing it to disappear. The fix was simple and now it’s correctly persisting after the dialog window closes.