DayPilot.Modal.confirm()
Read more in the JavaScript confirm() Replacement tutorial.
Hello, World!
DayPilot.Modal.confirm("Are you sure?").then(function(args) { console.log(args.result); });
CSS Theme ("modal_flat")
DayPilot.Modal.confirm("Are you sure?", { theme: "modal_flat" }).then(function(args) { console.log(args.result); });
CSS Theme ("modal_rounded")
DayPilot.Modal.confirm("Are you sure?", { theme: "modal_rounded" }).then(function(args) { console.log(args.result); });
Yes/No
DayPilot.Modal.confirm("Are you sure?", { okText: "Yes", cancelText: "No" }).then(function(args) { console.log(args.result); });
Result handling
DayPilot.Modal.confirm("Hello, World!") .then(function(args) { if (args.result) { DayPilot.Modal.alert("You clicked OK."); } else { DayPilot.Modal.alert("You canceled the modal dialog."); } });