Fires after a user commits dependency-link selection when linkClickHandling is "Select".

Declaration

DayPilot.Scheduler.onLinkSelected(args)

Parameters

  • args.link (DayPilot.Link): clicked link (read-only)

  • args.control (DayPilot.Scheduler): Scheduler instance (read-only)

  • args.originalEvent (MouseEvent): native mouse event (read-only)

  • args.ctrl, args.meta, args.shift, args.alt (boolean): modifier keys (read-only)

  • args.selected (boolean): membership after the change

  • args.previousSelected (boolean): membership before the change

  • args.change ("selected" | "deselected"): committed change

  • args.previousSelection (DayPilot.Link[]): previous selection snapshot

  • args.selection (DayPilot.Link[]): committed selection snapshot

The data fields are read-only; selection arrays are snapshots. Programmatic calls to links.selection methods do not fire selection callbacks. This notification cannot be canceled.

These excerpts configure an existing DayPilot Pro component. Keep its current timeline, resources and events.

JavaScript

const dp = new DayPilot.Scheduler("dp", {
  linkClickHandling: "Select",
  onLinkSelected: (args) => { console.log(args.selection.map(link => link.id())); }
});
dp.init();

Angular

<daypilot-scheduler [config]="config"></daypilot-scheduler>
config: DayPilot.SchedulerConfig = {
  linkClickHandling: "Select",
  onLinkSelected: (args) => { console.log(args.selection.map(link => link.id())); }
};

React

<DayPilotScheduler
  linkClickHandling={"Select"}
  onLinkSelected={(args) => { console.log(args.selection.map(link => link.id())); }}
/>

Vue

<DayPilotScheduler
  :linkClickHandling='"Select"'
  :onLinkSelected='(args) => { console.log(args.selection.map(link => link.id())); }'
/>

See Also

Link Selection

Availability

Availability of this API item in DayPilot editions:

ProductLitePro
DayPilot for JavaScript