You can use the real-time event handlers to implement it:
- EventMovingJavaScript
- EventResizingJavaScript
- TimeRangeSelectingJavaScript
The latest sandbox build (8.3.3582) supports DayPilot.Row.events.forRange(start, end) client-side method that you can use to find existing events in the row.
A quick example for event moving:
<DayPilot:DayPilotScheduler EventMovingJavaScript="moving(args)" ClientObjectName="dp" ... />
<script>
function moving(args) {
// find events at the target position that block the location
var events = dp.rows.find(args.resource).events.forRange(args.start, args.end).filter(function(e) { return e.id() !== args.e.id(); });
if (events.length > 0) {
args.allowed = false; // block this location
}
}
</script>
The filter() call above only removes the source event from the array. You'll need to modify the condition to also remove other events that don't block the target location.
You need to turn off the built-in overlap prevention feature (remove AllowEventOverlap="false").