The links.add() method adds a new link to the JavaScript Scheduler and updates the view.
Declaration
DayPilot.Scheduler.links.add(link);Parameters
link(DayPilot.Link or link data object) - new link to add
Notes
You can use this method to create dependency links programmatically. After the link is added, the Scheduler redraws the view.
Example
const dp = new DayPilot.Scheduler("dp", {
// ...
});
dp.init();
dp.links.add({
id: "link-1",
from: "event-1",
to: "event-2",
type: "FinishToStart"
});See Also
Link Creation (Drag and Drop) [doc.daypilot.org]
Links API [doc.daypilot.org]
DayPilot.Scheduler.links.find()
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot