The disposed() method returns true if the JavaScript Monthly Calendar component has already been disposed using the dispose() method.
DayPilot.Month.disposed()This method has no parameters.
Returns true when the component has been disposed; otherwise returns false.
if (month.disposed()) {
return;
}