Fires before a user changes dependency-link selection when linkClickHandling is "Select".
Declaration
DayPilot.Scheduler.onLinkSelect(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,args.previousSelected(boolean): membership before the proposed changeargs.proposedSelected(boolean): proposed membershipargs.previousSelection,args.selection(DayPilot.Link[]): selection snapshots before the changeargs.proposedSelection(DayPilot.Link[]): proposed selection snapshotargs.preventDefault(): cancels the selection change
The data fields are read-only; selection arrays are snapshots. Programmatic calls to links.selection methods do not fire selection callbacks. Canceling the selection still allows onLinkClicked to fire; cancel onLinkClick to cancel the entire click.
These excerpts configure an existing DayPilot Pro component. Keep its current timeline, resources and events.
JavaScript
const dp = new DayPilot.Scheduler("dp", {
linkClickHandling: "Select",
onLinkSelect: (args) => {
if (args.link.id() === "approval") {
args.preventDefault();
}
}
});
dp.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
linkClickHandling: "Select",
onLinkSelect: (args) => {
if (args.link.id() === "approval") {
args.preventDefault();
}
}
};React
<DayPilotScheduler
linkClickHandling={"Select"}
onLinkSelect={(args) => {
if (args.link.id() === "approval") {
args.preventDefault();
}
}}
/>Vue
<DayPilotScheduler
:linkClickHandling='"Select"'
:onLinkSelect='(args) => {
if (args.link.id() === "approval") {
args.preventDefault();
}
}'
/>See Also
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot