The links.add() method adds a new link to the JavaScript Scheduler and updates the view.
DayPilot.Scheduler.links.add(link);link (DayPilot.Link or link data object) - new link to add
You can use this method to create dependency links programmatically. After the link is added, the Scheduler redraws the view.
const dp = new DayPilot.Scheduler("dp", {
// ...
});
dp.init();
dp.links.add({
id: "link-1",
from: "event-1",
to: "event-2",
type: "FinishToStart"
});Link Creation (Drag and Drop) [doc.daypilot.org]
Links API [doc.daypilot.org]