Tooltip Override in Month View Calendar component

I’d like to ovveride the tooltip popup text in the month view component with results from a query related to the event hovered over. How would I acquire the index of the item hovered over (like selectedEvent, but like “hoveredEvent”), and then override the tooltip text? I’ve tried setting the toolTipText property (Mouseover Text) manually, but it doesn’t override the tooltip contents when you hover over an event, only when you hover over the month view object itself.

Thanks!
Clint.

I am also looking to do this and cannot figure it out.

Anyone have ideas?

You can go bind the property events to soemthing like this and it will work when you hoovered over it.

--You use CONCAT to create the message you want to display in the tooltip.  as you can see below.
 SELECT cast(appointtime as datetime) as start_date, cast(appointtime as datetime)
  as end_date, 'blue' as displayColor ,
(SELECT CONCAT('SO #', ordernumber, '<html><br> 
  Appointment time: ', appointtime, ' <br><br> Customer Name:',customername))
   as display FROM orders
   inner join customers c on c.id=orders.customerid

The only trouble I’m running into is that the client shows in the Calendar Component the html language code. I don’t know how to fix that yet. but we need html in order to organize the message you want. it will give a result like this.

image

a simple non standard solution to the problem would be adding white space before the text , this way the calendar event won’t show the words, html when you are looking at it and ,since the tooltip actually works correctly with , it ignores the white space so it works perfectly. but again this is not a standard solution. the code will be like this.

--I added white space after the order number, but before the <html>, this is in the case you are trying to put multiple information from a query like on my examples . i have  SO, then i query ordernumber and so on. 
 SELECT cast(appointtime as datetime) as start_date, cast(appointtime as datetime)
  as end_date, 'blue' as displayColor ,
(SELECT CONCAT('SO #', ordernumber, '                                     <html><br> 
  Appointment time: ', appointtime, ' <br><br> Customer Name:',customername))
   as display FROM orders
   inner join customers c on c.id=orders.customerid

result is this.

image

Hope it helps.

1 Like

Try putting your <html> codes at the very beginning of your string concatenation…

I had the at the beginning of the concat before, but it did not produce results I expected , that it is why i moved it to start later. putting the at the beginning makes it unreadable ,like example below. but thanks for the suggestion.

I don’t see a closing tag for the html in the concatenation, and since the break line tag is typically a self closing tag, you may want to change that to <br />, just to insure that the HTML is well formed.

 SELECT cast(appointtime as datetime) as start_date, cast(appointtime as datetime)
  as end_date, 'blue' as displayColor ,
(SELECT CONCAT('SO #', ordernumber, '<html><br/> 
  Appointment time: ', appointtime, ' <br/><br/> Customer Name:',customername,'</html>'))
   as display FROM orders
   inner join customers c on c.id=orders.customerid

Perhaps you’re adding the closing tag elsewhere in the code that you didn’t include, but this was what I noticed. If the HTML isn’t well formed it will not be parsed resulting in the tags being interpreted as normal strings.

Thanks, but i get the same unwanted result,so I will keep my original idea, which is not conventional, but gives 100% what i need.