search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Display Tooltip

Asked by Mike Lockwood
5 years ago.

I am wondering how to get the tooltip to showup for events. I have the property ShowToolTip = True but still nothing is displayed when I mouse over an event.

Comment posted by Robert
5 years ago.

In the dayPilot Calendar javascript open source version, in order to get a tooltip I did patch the code like this
the patched file is : js/daypilot/src/daypilot-calendar.src.js

look in the source code after the following function:
this._drawEvent = function(e) {

then find the place where the inner Div is created :
var inner = document.createElement("div");
inner.setAttribute("unselectable", "on");
inner.className = calendar._prefixCssClass("_event_inner");
inner.innerHTML = e.client.html();

// Robert - 11 May 2016 - event tool tip
if ((e.data.start instanceof DayPilot.Date) && (e.data.end instanceof DayPilot.Date)) {
// dont use the toolTip content which might be not pure ASCII
inner.title = e.data.start.toHourString() + ' - ' + e.data.end.toHourString();
}

Answer posted by Luke
5 years ago.

This solutions works w/ the API.

this._drawEvent = function(e) {

...

var inner = document.createElement("div");
inner.setAttribute("unselectable", "on");
inner.className = calendar._prefixCssClass("_event_inner");
inner.innerHTML = e.client.html();
inner.title = e.client.toolTip();

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.