The snapToGrid property (boolean) determines whether drag-and-drop interactions are snapped to grid cells in the JavaScript Scheduler component.
Declaration
DayPilot.Scheduler.snapToGridDefault Value
trueNotes
This setting controls snapping during event moving, event resizing, and time range selection.
You can enable or disable snapping for individual interactions using DayPilot.Scheduler.snapToGridEventMoving, DayPilot.Scheduler.snapToGridEventResizing, DayPilot.Scheduler.snapToGridTimeRangeSelecting, and DayPilot.Scheduler.snapToGridRectangleSelecting.
Examples
JavaScript
const dp = new DayPilot.Scheduler("dp", {
snapToGrid: false,
// ...
});
dp.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
snapToGrid: false,
// ...
};React
<DayPilotScheduler
snapToGrid={false}
{/* ... */}
/>Vue
<DayPilotScheduler
:snapToGrid="false"
<!-- ... -->
/>See Also
DayPilot.Scheduler.useEventBoxes
DayPilot.Scheduler.snapToGridEventMoving
DayPilot.Scheduler.snapToGridEventResizing
DayPilot.Scheduler.snapToGridTimeRangeSelecting
DayPilot.Scheduler.snapToGridRectangleSelecting
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot