EventTooltip on click

Show cool things you have done with our products


Post Reply
User avatar
feeter09
Posts: 2
Joined: Tue Oct 15, 2019 9:19 pm

EventTooltip on click

Post by feeter09 »

Hi

I'm trying to use some features (free trial for now) and I would like to know if is possible disable this property "showOnHover" and the same time enable click on each event and display the tooltip.

I'm using the Scheduler 2.2.5.

Thanks
F.B

User avatar
feeter09
Posts: 2
Joined: Tue Oct 15, 2019 9:19 pm

Re: EventTooltip on click

Post by feeter09 »

Hi

I found this event "eventClick", so I disable the option eventTooltip.disable, and it works I was expected.

User avatar
sergey.maltsev
Core Developer
Core Developer
Posts: 659
Joined: Mon Dec 24, 2018 9:15 am

Re: EventTooltip on click

Post by sergey.maltsev »

Hi!

Yes. This is exact you need.
Your code to reuse existing eventTooltip should be like this one.
This will disable tooltip only but not the whole feature.

Code: Select all

let scheduler = new Scheduler({
...
    listeners : {
        eventClick : ({ eventElement }) => {
            const tooltip = scheduler.features.eventTooltip.tooltip;
            tooltip.activeTarget = eventElement;
            tooltip.showBy(eventElement);
        }
    }
});

scheduler.features.eventTooltip.tooltip.disabled = true;

Post Reply