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

How to avoid resizing under a certain duration in Daypilot Calendar?

Asked by Anonymous
6 months ago.

I have some events i can resize even to zero minutes, the minimum should be 15. What do you suggest?

Answer posted by Dan Letecky [DayPilot]
6 months ago.

You can use the onEventResizing event to customize the behavior during drag-and-drop resizing. You can use it to enforce custom rules, such as setting a minimum duration:

onEventResizing: args => {
    const duration = new DayPilot.Duration(args.start, args.end);
    if (duration.totalMinutes() < 15) {
        args.allowed = false;
    }
},

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