The dispose() method destroys the JavaScript Calendar component. It removes removes the content of the placeholder div and performs a cleanup.
After calling dispose() the DayPilot.Calendar object becomes unusable.
dispose()
DayPilot.Calendar.dispose();