The links.update() method updates and redraws the specified link in the JavaScript Scheduler component.

Declaration

DayPilot.Scheduler.links.update(link)

Parameters

Notes

You can get the link object using the DayPilot.Scheduler.links.find() method.

Example

Change the color of a link and redraw it.

const link = scheduler.links.find(1);
link.data.color = "blue";
scheduler.links.update(link);

Raw Data Replacement

You can also pass a raw link data object with a required id. It replaces the matching link data. Include the endpoint IDs and all properties that should remain. Selection is retained for a stable link ID.

dp.links.update({id: "L1", from: 1, to: 2, color: "#2563eb"});

See Also

DayPilot.Scheduler.links.find()

DayPilot.Link Class

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

DayPilot.Scheduler Class

Availability

Availability of this API item in DayPilot editions:

ProductLitePro
DayPilot for JavaScript