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.
Declaration
DayPilot.Scheduler.onLinkCreated(args)Parameters
args.from(string | number) - source event IDargs.to(string | number) - target event IDargs.type(string) - link type ("StartToStart","StartToFinish","FinishToStart","FinishToFinish")
Notes
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.
Examples
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);
};See Also
DayPilot.Scheduler.onLinkCreate
DayPilot.Scheduler.linkCreateHandling
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot