Search code examples
jqueryfullcalendar-scheduler

FullCalendar: allow event only to be moved from one resource to another


I tried many things (editable, eventContraint, ... ) how can I setup a FullCalendar, so that an event can only be changed from one resource to another, but that it is not allowed to change the start, end or duration?

I really have no clue in what direction to look for, I tried to work with businesshours, eventContraint,...

anybody has any clue or idea how this can be achieved?

Thanks...


Solution

  • According to the fullcalendar site https://fullcalendar.io/docs/resource_events/eventResourceEditable/

    Preventing date changes, but allowing resource changes

    If you'd like to allow the user to drag-n-drop an event to a different resource, you can set the master editable flag to false, but override it specifically for event resources:

    $('#calendar').fullCalendar({
       defaultView: 'timeline',
       editable: false, // don't allow event dragging
       eventResourceEditable: true // except for between resources
    
       // resource and event data...
    });