Is it possible to restrict which events can be moved and/or deleted?

Hi,

I’d like to know if there is an easy way to prevent just some specific events in a calendar to be moved and deleted, e.g. restricted or allowed by the presence of an event property.

If not, what would be the best way to achieve this?

Thanks in advance, Alex

Hello @Alex :wave:

Sure, please check this demo and see how you can control the drag & drop on an event level: Timeline Conditional move & resize per event, resource or globally Example | Mobiscroll

For locking events you can set editable to false, also on the event level. More about it on the website: Timeline Event properties Example | Mobiscroll

1 Like

Hello @Zsombor,

thank you, that’s perfect. :slight_smile:

Hey @Zsombor,

just a small idea, that would make a nice feature:

If a resource preventOverlap key would accept a list of resources, that mustn’t overlap, instead of like eventOverlap just referring to the current one.

So, in this example bar and baz couldn’t overlap:

resources: [{
  id: 'foo'
},{
  id: 'bar'
},{
  id: 'baz',
  preventOverlap: [ 'bar' ]
}]

Hi @Alex,

That’s an interesting idea. Just to be sure that I understand… that would mean that not only events under ‘baz’ couldn’t overlap, but it won’t be allowed to happen overlaps between ‘baz’ and ‘bar’ events?

What’s your use-case?

Hi @kovlex,

yes, exactly!

My personal use case is if one rule is active during a period of time, others of the same group shouldn’t be active during that time range. But a different group of actions may overlap.