Turning off snap-to-grid behavior for moving/resizing
By default, event boxes are snapped to the background time cell grid during moving and resizing in Scheduler. It's possible to move and resize the events by free hand.
Notes:
-
The actual position is calculated based on the number of pixels per cell (CellWidth).
-
It's recommended to set
useEventBoxes="Never"
to prevent confusion (the moving/resizing shadow width always corresponds to the event box width). See also exact event duration.
JavaScript
Example:
<div id="dp"></div>
<script type="text/javascript">
var dp = new DayPilot.Scheduler("dp");
dp.snapToGrid = false;
// ...
dp.init();
</script>
Tutorial: Custom Snap-To-Grid Rules
ASP.NET WebForms
Example:
<DayPilot:DayPilotScheduler runat="server" id="DayPilotScheduler1"
...
SnapToGrid = "false"
/>
ASP.NET MVC
Example:
@Html.DayPilotScheduler("dps", new DayPilotSchedulerConfig {
BackendUrl = ResolveUrl("~/Scheduler/Backend"),
...
SnapToGrid = false
})