<telerik:RadDatePicker ID="RadDatePicker1" runat="server">
<Calendar runat="server" ShowDayCellToolTips="false">
<ClientEvents OnLoad="calendarLoad" />
</Calendar>
</telerik:RadDatePicker>
function calendarLoad(sender, args) {
$(sender.get_element()).find("[title]").each(function (i, el)
{
el.title = ""; });
}
however when i use this code, it DOES remove the title text, but the tooltip still shows up blank. we have deployed the RadTooltipManager in our Master Page. is there some way to mute these blank tooltips from the calendar? is there no setting like ShowDayCellToolTips="false" for the day cells that apply to the navigation and Day of the Week titles?
this is very frustrating. any help would be GREATLY appreciated
thanks in Advance
5 Answers, 1 is accepted
Does the approach work on a page without a RadTooltipManager?
Looking forward to hearing from you.
Regards,
Eyup
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Hi,
When the AutoTooltipify feature of the tooltip manager is enabled, it attaches event handlers to all elements with a title attribute as soon as it initializes. This is during the Sys.Application.Init phase (and event).
Using the OnLoad event of the calenar (or any other similar control) cannot guarantee that the tooltip manager has not initialized yet and has not attached those handlers. Thus, RadToolTips attempt to show up when the elements are hovered, but since their title attribute is no longer there, the tooltips are blank.
What I can suggest is the following:
- Use an earlier event to remove title attributes (e.g., the document.ready jQuery event). You can access the datepicker through its class, for example, instead of using the sender reference.
- Use the OnClientBeforeShow event of the tooltips to cancel it when your conditions are met (e.g., the tooltip has no text, a certain condition is met for its target, etc.). This could be a more generic approach but it would require some investigation on your end so you can find the exact conditions and checks in order to achieve the functionality you desire.
As you can see there is no really straightforward way to do this, because AutoTooltipify is a really simple feature. It provides a lot of automation, but this comes at the price of less customization options.
Regards,
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
try {
var DOB = $find(ctl00_ContentPlaceHolderBody_RadDatePickerDOB_calendar);
DOB.Disabletooltip();
$(DOB.get_element()).find("[title]").each(function (i, el) {
el.title = "";
});
}
But i keep getting an Undefined error.
what am i doing wrong?
I have this on the document.Ready() function
but doesnt seem to work, any help greatly appreciated
Add this function to your page that contains the RadTooltipManager:
function OnClientBeforeShow(sender, args){
if(sender.get_targetControlID().indexOf("RadDatePicker1")!= - 1) {
args.set_cancel(true);
}}
In the RadTooltipManager Attributes, add the following:
OnClientBeforeShow="OnClientBeforeShow"
my application has all these items in a Master Page, it is working and i see no tooltips for the calendar
Hope that is helpful