# JavaScript alert() Replacement

DayPilot for JavaScript - AJAX Calendar/Scheduling Widgets for JavaScript/HTML5/jQuery/AngularJS

# DayPilot.Modal.alert()

Read more in the JavaScript alert() Replacement tutorial.

Hello, World!

    DayPilot.Modal.alert("Hello, World!");

Run
CSS Theme ("modal_flat")

    DayPilot.Modal.alert("Hello, World!", { theme: "modal_flat" });

Run
CSS Theme ("modal_rounded")

    DayPilot.Modal.alert("Hello, World!", { theme: "modal_rounded" });

Run
Event Handling

    DayPilot.Modal.alert("Hello, World!")
    .then(function(args) {
        if (args.canceled) {
            DayPilot.Modal.alert("You canceled the modal dialog.");
        }
        else {
            DayPilot.Modal.alert("You clicked OK.");
        }
    });

Run