The showUrl() method displays the modal dialog and loads the content from the specified URL.
DayPilot.Modal.showUrl(url: string): voidurl (string) - content page URL
The modal dialog content is displayed using an <iframe>. That means the content page runs in a different JavaScript context.
To reach the parent window from the content page, use the parent object. You can also access the DayPilot.Modal instance that opened this dialog using the DayPilot.Modal.opener() method. The content page must include the daypilot-modal.js script to access DayPilot.Modal.
const modal = new DayPilot.Modal({
onClose: (args) => {
console.log("result", args.result);
}
});
modal.showUrl("/edit/123");