The links.findByFromTo() method finds a link by the IDs of the JavaScript Scheduler events it connects.
DayPilot.Scheduler.links.findByFromTo(from, to)from - the ID of the source event
to - the ID of the target event
Returns a DayPilot.Link object if the link is found; otherwise it returns null.
If there are multiple links connecting these events, the first one is returned.
The id values are compared using ===, so 1 is different from "1".
const link = scheduler.links.findByFromTo("event-1", "event-2");
if (link) {
// ...
}DayPilot.Scheduler.links.find()
DayPilot.Scheduler.links.findAllByFromTo()
Links API [doc.daypilot.org]