search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How to disable moving certain events

Asked by Jeff Kurzner
4 years ago.

I have events that come from different sources those from external sources need to be locked so the user cannot edit or move or resize them. However, for all other events I do need to allow the user to edit their own events. I have tried setting eventMoveHandling to "Enabled" and then args.e.EventMoveEnabled = false in the onBeforeEventRender and it still seems to allow event moving for all cases. Each time when I drag an event the dp.onEventMoved function is firing.

Is there a working example that might shed a light on my difficulty?

Answer posted by Dan Letecky [DayPilot]
4 years ago.

It looks like you are using the ASP.NET syntax. In JavaScript, the property name is "moveDisabled".

dp.onBeforeEventRender = function(args) {
  args.data.moveDisabled = true;
};

See also:
https://doc.daypilot.org/scheduler/event-customization/
https://api.daypilot.org/daypilot-event-data/

Comment posted by Jeff Kurzner
4 years ago.

WOO HOO! Genius. Thanks so much.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.