Enable/disable hover tooltip

Hello,

How can I enable/disable the hover tooltip in events.

Hello @Daju99 ,

If you want to disable the tooltip functionality at all, you can just remove the tooltip: true from active plugins:
https://docs.dhtmlx.com/scheduler/api__scheduler_plugins.html

If you want to display tooltips only for some of the events, you can use the tooltip_text template:
https://docs.dhtmlx.com/scheduler/api__scheduler_tooltip_text_template.html

In which you can add the condition if the tooltip should be displayed or not, like follows:

scheduler.templates.tooltip_text = function(start,end,ev){
    if(ev.id % 2)
        return "<b>Event:</b> "+ev.text+"<br/><b>Start date:</b> " + 
    scheduler.templates.tooltip_date_format(start)+ 
    "<br/><b>End date:</b> "+scheduler.templates.tooltip_date_format(end);
};

Here is a demo(as you can see, hovering the mouse on some events won’t show the tooltip):
https://snippet.dhtmlx.com/gmdigx1f

Kind regards,

1 Like