When events are draggable in fullcalendar, I can drag them up past the start hour and down past the end hour. This happens with a minTime and maxTime configured and when they are not configured (i.e. midnight to midnight). I need events to not be allowed to be dragged past the hour boundaries of the day or configured time range.
I don’t see anything in the documentation about stopping this behavior. Has anyone run into this issue and come up with a solution or does anyone have a solution to resolve this problem?
After some research and experimenting, I have discovered the solution to this problem is by using the
containmentoption in the jQuery UI draggable plugin.To stop the behavior described in the question, follow these steps:
draggableSlotEvent.eventElement.draggable({.containment: ".fc-agenda-body table",You will now be unable to drag events past the hour boundaries.