Page 1 of 1

[INFO REQ]

Posted: Tue Dec 06, 2022 6:43 pm
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!


Re: [INFO REQ]

Posted: Tue Dec 06, 2022 7:53 pm
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
        };
    }
},