Our pure JavaScript Scheduler component


Post by filipirafael »

Hi guys, what's up?

I need some events to be dragged only to the right side, but i don't know how to set that up and i can't find it in the Scheduler.feature.EventDrag documentation.

Do you know if it's possible?

Thanks!


Post by mats »

This demo shows exactly this https://bryntum.com/products/schedulerpro/examples/highlight-time-spans/

Add this method on your Scheduler:

// This template method dictates how event bars are constrained for drag drop, resize and create UI interactions
    getDateConstraints(resourceRecord, eventRecord) {
        const { minStartDate, maxEndDate } = eventRecord;

    if (minStartDate) {
        return {
            start : minStartDate,
            end   : maxEndDate
        };
    }
},

Post Reply