Our pure JavaScript Scheduler component


Post by Hiba Rizk »

i'm using latest scheduler

I have a scheduler in a vertical mode and using a custom time axis. The customization is shown in the code below, for DAY units, the ticks are not going to be full 24-hour blocks, but 8-hour blocks to simulate the workday.
timeAxis = {
        continuous : false,
        generateTicks(start, end, unit, increment) {
            const ticks = [];
            while (start < end) {
                if (unit !== 'hour' || start.getHours() >= 8 && start.getHours() <= 16) {
                    ticks.push({
                        id        : ticks.length + 1,
                        startDate : start,
                        endDate   : DateHelper.add(start, increment, unit)
                    });
                }
                start = DateHelper.add(start, increment, unit);
            }
            return ticks;
        }
    };
what i want to do is to prevent the user also from dragging the event from resource to another

The problem is that when I set the event drag constrainDragToResource true is not working
eventDrag: {
	constrainDragToResource: true }
 },


i was able to reproduce this in your example link : https://www.bryntum.com/examples/scheduler/timeaxis/
and all that i have changes is :
            features : {
                sort        : 'name',
                eventResize :false,
				eventDrag:{
					constrainDragToResource: true }
				},
			mode: 'vertical',
can you please let me know what is that i miss and is there a way to accomplish this behavior?
Thank you in advance

Post by pmiklashevich »

That's a bug! Ticket here: https://github.com/bryntum/support/issues/466
Thank you for the report!

Pavlo Miklashevych
Sr. Frontend Developer


Post by Hiba Rizk »

hello,

how do i get the fix ?

Post by pmiklashevich »

The fix will be a part of the next release and nightlies (starting from tomorrow).

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply