DayPilot.Scheduler.links.load

The links.load() method loads link data directly from the specified URL using an HTTP request. As soon as it receives a response, the JavaScript Scheduler component updates the view and displays the links.

Declaration

DayPilot.Scheduler.links.load(url[, success[, error[, options]]])

Parameters

  • url (string) - JSON endpoint URL

  • success (function) - success callback. The args object provides the response data in args.data and lets you cancel the default handling using args.preventDefault().

  • error (function) - error callback. The args object provides the failed request and the thrown exception.

  • options (object) - additional options. Use dontAddStartEnd (boolean) to prevent adding the current viewport start and end dates to the query string.

Notes

Set options.dontAddStartEnd to true if the endpoint should not receive the current viewport start and end dates in the query string.

Example

dp.links.load("/api/links", (args) => {
  dp.message("Links loaded");
});

See Also

Links API [doc.daypilot.org]

Dependency Links in the Scheduler Component [doc.daypilot.org]

DayPilot.Scheduler Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript