Fullcalendar drag and drop allday
events, fullcalendar, jquery, jquery-plugins
Solution
Check this fiddle: http://jsfiddle.net/100thGear/GPx28/
Some points to note:
- The `allDay` parameter in the `eventDrop` callback doesn't represent the event's allDay. It represents the slot's allDay ability. So, in week view, the top bar will have `allDay` as `true` and the time-slots below will have `allDay` as `false`.
- The `event` parameter in the `eventDrop` callback has the updated date/time. So if you moved an event from the allDay slot to the 6:30 AM slot, the start of the event in this callback will actually say 6:30:00. So, I stored the allDay parameter for the dragged event in a variable at drag-start (through the `eventDragStart` callback)
- The `id` attribute of an event determines if it is a repeatable event. In your fiddle the allDay event and the normal event both had the same id - which will complicate your dragging operations. Avoid this if you can.
- Lastly, I think you knew this, but the correct callback after an event is dropped is called `eventDrop` - not just drop.
Hope this helps!
Problem
I have a fullcalendar with both normal events and allDay events. I want to disable the allDay-events from being able to be dragged into normal events in the agenda view. The allday events have both start-time and end-time set from the begining so I cant check if the endtime is null. Perhaps there is a way in the eventDrop-function to block this off?