Prevent resize, but allow drag for specific events

In the timeline view, I can prevent dragResize for all events, or I can make a specific event non editable.

I would like to allow an event to be dragged, but not resized. Is this possible?

Hello @Andrew2,

At the moment it’s not possible to disable the resize option for a specific event, it only can be set for all events. While it is not supported, I would be more than happy to pass this on to the product team and add your voice to it. Feel free to share additional information that helps me describe the use-case in detail.

In the meantime a workaround would be to use the onEventUpdate event, where you have the old and the updated events as parameters, and you can check for the resize yourself. Returning false in that event, will prevent the resizing of the event.

Please note that you will have to use the [options] attribute for that event:

<mbsc-eventcalendar [options]="myoptions" ...

And the in in your TS:

public myoptions = {
    onEventUpdate: () => {
        // return false if it was a resize
    }
};

Hi,

Our use case is that an appointment is fixed in time, but we can change the resource. So I’d like to be able to drag the event up/down between resources, but not left/right.

Right now I have this working by setting the invalid ranges to any date outside the start/end, but it still allows the event to be reduced in length by resizing.

Ideally it would be good to be able to cancel the drag/drop in onEventDragStart, rather than let the user drag the event and catch it on update.

Also, in onEventUpdate, the oldEvent seems to be missing start/end values. So I cannot calculate if the date was changed.

image