The onLinkClick event handler fires when the user clicks a link in the JavaScript Scheduler component. It runs before the default action.
DayPilot.Scheduler.onLinkClick(args)args.link (DayPilot.Link) - the target link
Use this handler when you need to inspect the clicked DayPilot.Link object before the built-in Scheduler link action completes. If you need to react after the default action, use onLinkClicked instead.
JavaScript
const dp = new DayPilot.Scheduler("dp", {
onLinkClick: (args) => {
console.log("Link clicked before default action", args.link);
},
// ...
});
dp.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
onLinkClick: (args) => {
console.log("Link clicked before default action", args.link);
},
// ...
};React
<DayPilotScheduler
onLinkClick={onLinkClick}
{/* ... */}
/>const onLinkClick = (args) => {
console.log("Link clicked before default action", args.link);
};Vue
<DayPilotScheduler
@linkClick="onLinkClick"
<!-- ... -->
/>const onLinkClick = (args) => {
console.log("Link clicked before default action", args.link);
};Links [doc.daypilot.org]