Tooltip just over a few Events

Hello

I would like to show the tooltip just when the specified field has text in. Is this possible?
I tried the following

scheduler.templates.tooltip_text = function(start,end,event) {
	if ((event.termin_bemerkung != 'undefined') && (event.termin_bemerkung != '')) {
  	   return event.termin_bemerkung;   
	} 	
}

but appears with all the events :frowning:

Can be done only through code modification

dhtmlxscheduler_tooltip.js

var text = scheduler.templates.tooltip_text if (!text) return; // this line need to be added

The same modification will be added in the main codebase, so in next version such behavior will be by default.

Works fine … thank you :slight_smile:

There is another problem. If i go out of an event it works and the tooltip hides but if there is an event directly above or below it doesn’t.

Try to replace the above mentioned line

if (!text) return;

as

if (!text) return dhxTooltip.hide();

No :frowning:
Same as before …

Can you provide some kind of sample or demo link? ( I can’t reconstruct problem locally )

Hey … sorry that i write so late. Here you have a big demo page. Just move around the events and you’ll see the problem.

When you do this you maybe can check a bug with creating events. Please have a look at the photo, try to make an event at this position and have a look what happens to the events. This always happens when i want to create an event and there’s one directly under.

thank you really much


I forgot the page :slight_smile:

scheffel-kommunikation.com/s … ,mode=unit

To fix tooltips, in dhtmlxscheduler_tooltip.js alter the next line

var G = scheduler.templates.tooltip_text(B.start_date, B.end_date, B);

as

var G = scheduler.templates.tooltip_text(B.start_date, B.end_date, B); if (!G) return dhxTooltip.hide();

Still don’t work :frowning: