DayPilot.Modal.prompt

The prompt() method displays a pre-configured modal dialog that displays a custom message and an input box for entering user data.

Declaration

DayPilot.Modal.prompt(message[, defaultValue [, options]]);

Parameters

  • message (string) - HTML message
  • defaultValue (string) - default value of the input box
  • options (object) - an object that specifies custom DayPilot.Modal properties

Return Value

 A Promise. The success handler of the promise will be called when the modal dialog is closed (using either button or by clicking the background). The failure handler is never called.

The success handler receives the args parameter from onClosed event handler.

Notes

In addition to the standard properties you can specify custom button text using the options object:

  • options.okText
  • options.cancelText

By default, the confirm() modal dialog uses height = 40 and useIframe = false.

Tutorial