The close() method closes the modal dialog. You can send custom parameter to onClose/onClosed event handlers.
DayPilot.Modal.close(result);
The close() method can be called on a DayPilot.Modal instance or as a static method.
If you call it on an instance it will close the specified modal dialog:
var modal = new DayPilot.Modal(); modal.showHtml("Hi"); // ... modal.close();
You can also call it as a static method from inside of a modal dialog that uses showUrl() to display a custom page. In that case it will close the last instance:
var modal1 = new DayPilot.Modal(); modal1.showUrl("/page/edit");
Inside "/page/edit":
DayPilot.Modal.close();