Clears dependency-link selection.
Declaration
DayPilot.Scheduler.links.selection.clear(): voidReturn Value
No return value.
Notes
Programmatic selection changes do not fire onLinkSelect or onLinkSelected. Selection is separate from event and row selection. Assign stable link IDs to retain selection when link data is refreshed.
The framework excerpts belong inside an existing Scheduler component. Call the method after the control has initialized and the link has been loaded. Angular uses the DayPilot types and ViewChild; React uses useRef.
JavaScript
dp is the initialized Scheduler instance.
dp.links.selection.clear();Angular
<daypilot-scheduler [config]="config" #scheduler></daypilot-scheduler>@ViewChild("scheduler") scheduler!: DayPilotSchedulerComponent;
config: DayPilot.SchedulerConfig = {linkClickHandling: "Select"};
checkSelection() {
const dp = this.scheduler.control;
dp.links.selection.clear();
}React
const scheduler = useRef(null);
function checkSelection() {
const dp = scheduler.current;
dp.links.selection.clear();
}
<DayPilotScheduler
controlRef={control => { scheduler.current = control; }}
linkClickHandling={"Select"}
/>Vue
<script setup>
import {ref} from "vue";
const scheduler = ref(null);
function checkSelection() {
const dp = scheduler.value.control;
dp.links.selection.clear();
}
</script>
<template>
<DayPilotScheduler ref="scheduler" linkClickHandling="Select" />
</template>See Also
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot