The onLinkCreated event handler fires when the user finishes creating a link using drag and drop, after the default action configured by linkCreateHandling has been performed.
DayPilot.Scheduler.onLinkCreated(args)args.from (string | number) - source event ID
args.to (string | number) - target event ID
args.type (string) - link type ("StartToStart", "StartToFinish", "FinishToStart", "FinishToFinish")
Use this event to react to completed link creation after the default handling has updated the Scheduler state. If you need to intercept link creation before the built-in action runs, use onLinkCreate instead.
JavaScript
const dp = new DayPilot.Scheduler("dp", {
onLinkCreated: (args) => {
dp.message("Link created, type: " + args.type);
},
// ...
});
dp.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
onLinkCreated: (args) => {
console.log(args.from, args.to, args.type);
},
// ...
};React
<DayPilotScheduler
onLinkCreated={onLinkCreated}
{/* ... */}
/>const onLinkCreated = (args) => {
console.log(args.from, args.to, args.type);
};Vue
<DayPilotScheduler
@linkCreated="onLinkCreated"
<!-- ... -->
/>const onLinkCreated = (args) => {
console.log(args.from, args.to, args.type);
};DayPilot.Scheduler.onLinkCreate