The onLinkClick event handler fires when the user clicks a link in the JavaScript Scheduler component. It runs before the default action.
Declaration
DayPilot.Scheduler.onLinkClick(args)Parameters
args.link(DayPilot.Link) - the target link
Notes
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.
Examples
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);
};See Also
Links [doc.daypilot.org]
DayPilot.Scheduler.onLinkClicked
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot