The dispose() method destroys the control, removes the content of the placeholder <div>, and cleans up the object.
DayPilot.Month.dispose()This method has no parameters.
After calling dispose(), the DayPilot.Month object is unusable.
const month = new DayPilot.Month("dp", {
// ...
});
month.init();
// ...
month.dispose();