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

Preventing event create / resize / move on business days

Asked by B.
5 years ago.

I'm trying to find a way to disable dropping an event on business days, but I can't find anything about this in the docs. So here's what I did. On each cell select, I find the cell using the selection's end date and resource and check if it has the business property set false. If it does, I set allow to false.

onTimeRangeSelecting: function(args) {
var find = $scope.dp.cells.find(args.end, args.resource);

if (!find[0].properties.business) {
args.allowed = false;
}
}

This doesn't work well, because I need to check each date between start and end date, which is what I'll do next. But I wanted to check with you to see if there was another way to do this natively without all the extra code.

Thanks!

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

It will be possible to set .allowed false in onBeforeCellRender. This feature is in the works - it's not available yet.

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