The loadingStart() method displays a loading label in the upper-left corner of the JavaScript Scheduler and can optionally block the UI.
Declaration
DayPilot.Scheduler.loadingStart(options)Parameters
The options object is available since 2020.2.4337.
options.delay(number) - the label is displayed only if loadingStop() is not called within the specified number of millisecondsoptions.text(string) - label text; if not specified, loadingLabelText is used, but only when loadingLabelVisible is set totrueoptions.block(boolean) - blocks the UI using an overlay<div>; if not specified, blockOnCallBack is used
Notes
You can use this method to indicate that an HTTP call is in progress:
Loading label text: To display the loading label, loadingLabelVisible must be set to
trueor you need to provide the text usingoptions.text.Blocking the UI: If blockOnCallBack is set to
true(the default value isfalse),loadingStart()displays an overlay<div>element over the Scheduler to prevent access to the UI.
To hide the message and unblock the UI, call loadingStop() when the HTTP response arrives.
Example
dp.loadingStart({ delay: 100, text: "Please wait...", block: true });
const { data } = DayPilot.Http.get("/events");
dp.update({ events: data });
dp.loadingStop();See Also
Loading Label [doc.daypilot.org]
DayPilot.Scheduler.blockOnCallBack
DayPilot.Scheduler.loadingLabelText
DayPilot.Scheduler.loadingLabelVisible
DayPilot.Scheduler.loadingStop()
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot