JavaScript prompt() Replacement

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

DayPilot.Modal.prompt()

Read more in the JavaScript prompt() Replacement tutorial.

Hello, World!
DayPilot.Modal.prompt("Your name:").then(function(args) {
    console.log(args.result);
});
Default Value
DayPilot.Modal.prompt("Your name:", "John").then(function(args) {
    console.log(args.result);
});
CSS Theme ("modal_flat")
DayPilot.Modal.prompt("Your name:", { theme: "modal_flat" }).then(function(args) {
    console.log(args.result);
});
CSS Theme ("modal_rounded")
DayPilot.Modal.prompt("Your name:", { theme: "modal_rounded" }).then(function(args) {
    console.log(args.result);
});
Event Handling
DayPilot.Modal.prompt("Your name:").then(function(args) {
    if (!args.canceled) {
        var name = escapeHtml(args.result);
        DayPilot.Modal.alert("Hello " + name + "!");
    }
});