The container property (HTMLElement) specifies the parent DOM element that will be used to display the modal dialog, including the background overlay and the modal content.
Declaration
DayPilot.Modal.containerDefault Value
nullNotes
If not specified, the modal dialog uses document.body as the container.
Example
HTML modal example:
const target = document.getElementById("target");
const modal = new DayPilot.Modal({
container: target,
// ...
});
modal.showHtml("Hello world!");JavaScript prompt() example:
DayPilot.Modal.prompt("Your name:", "", {
container: document.getElementById("target")
});See Also
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot