vkurko / calendar

Full-sized drag & drop JavaScript event calendar with resource & timeline views

Home Page:https://vkurko.github.io/calendar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preventing Event Overlap

csonic656 opened this issue · comments

I really like this calendar, but I have a particularly specific use case for it. I was wondering if it would be possible to prevent events from overlapping, or perhaps once overlapped, combine the two events, particularly in the timeGridWeek view? Also, would it be possible to prevent events from being drag created into multiple days?

If I understand you correctly, then overlapping events shouldn't happen during dragging? The only way to control this in your case is to use the eventDrop hook. Inside the hook, you can check if the conditions are met and then cancel the drag by calling the revert method.

I hope I can close this issue.