DHTMLX Docs & Samples Explorer

Preventing events collisions

In many use-cases you may need to limit count of events per time slot, for example - deny creation of the second event if one event has been already defined at that time. To automate such a task the “collision” extension can be used.

To activate extension you need to include the related js file

<script src="codebase/ext/dhtmlxscheduler_collision.js"></script>

Actually that is all. From that point scheduler won't allow to create a new event or move any existent event to the timezone which is occupied by another one.

If you need to have more than one event per a time slot, you can set the collision_limit property:

scheduler.config.collision_limit = 2; //allows 2 events per a time slot

If attempt to create an event in the occupied time slot is detected, the scheduler will generate onEventCollision event

With recurring events, the extension works from version 2.3+.