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

Prevent moving between resources

Asked by Bogdan
10 years ago.

Hello,

How Can I prevent event moving between two resources?

Let's suppose that I have a resource id (1)

if (args.e.resource() == 1 && args.newResource == 1){
//do the moving
}

The problem is that args.e.resource() takes the resource id of the destination, so when I move the event into resource 1 it'll always work.

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

You should set .moveVDisabled property of the event to true:

http://doc.daypilot.org/scheduler/limit-event-moving/

You can do it directly in event data object or using onBeforeEventRender event handler.

Comment posted by Bogdan
10 years ago.

Hello,

Thank you, that solved my question. Besides start, end, id, resource, text, toolTip, backColor, moveVDisabled, moveHDisabled what other properties I can set?

Comment posted by Dan Letecky [DayPilot]
10 years ago.

You can find the list of supported properties here:

http://api.daypilot.org/daypilot-event-data/

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