Our pure JavaScript Scheduler component


Post by tomerPlanit »

Hi bryntum team,
I work with scheduler v3.0 with angular.
I try to add click or contextmenu event to resource time rang element .
(document.querySelectorAll('.b-sch-resourcetimerange')).forEach((element: HTMLElement) => {
                console.log(element);
                element.addEventListener('click', () => { console.log('long'); });
            });
and it is not work.

Post by saki »

Resource time ranges DOM elements are covered by a transparent div that has pointer events turned off. This is by design and cannot be changed at the application level.

What exactly do you want to achieve, maybe there is another way?
Screen Shot 2020-01-15 at 14.49.15.png
Screen Shot 2020-01-15 at 14.49.15.png (632.05 KiB) Viewed 1344 times

Post by tomerPlanit »

i want be able to open context menu and get the Resource time range that i clicked on, show cursor: pointer in css.

Post by nick.savenko »

Please need update on this one!


Post by mats »

As Saki said, this is not supported but you can of course try to fix this yourself. You just need to shuffle the CSS a bit:

.b-timeline-subgrid .b-sch-range {
    pointer-events: all;
}

Now you can reach the elements and you can add DOM event listeners to them etc.


Post Reply