DayPilot.Modal.container

The container property specifies the parent DOM element that will be used to display the modal dialog (that includes the background overlay and the modal content).

If not specified, the modal dialog will use document.body as the container.

Default Value

null

Example

HTML modal example:

const myTarget = document.getElementById("target");
const modal = new DayPilot.Modal({
  container: myTarget
});
modal.showHtml("Hello world!");

JavaScript prompt() example:

DayPilot.Modal.prompt("Your name:", "", {
  container: document.getElementById("target")
});