The alert() method displays custom HTML in a pre-configured modal dialog.
Declaration
DayPilot.Modal.alert(message[, options])Parameters
message(string) - HTML content displayed in the dialogoptions(object) - an object that specifies DayPilot.Modal properties
Return Value
Returns a Promise. The promise resolves when the dialog is closed and receives the args object from DayPilot.Modal.onClosed. The promise never rejects.
Notes
In addition to the standard DayPilot.Modal properties, the options object can define custom button text using options.okText.
By default, the pre-configured dialog uses DayPilot.Modal.height = 40 and DayPilot.Modal.useIframe = false.
Example
const modal = await DayPilot.Modal.alert("<strong>Saved</strong>", {
okText: "Continue"
});
console.log("Dialog closed", modal.result);See Also
JavaScript alert() Replacement [code.daypilot.org]
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot