This is a migrated thread and some comments may be shown as answers.

RadCalendar and ModalTooltip

2 Answers 44 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Nikolas G
Top achievements
Rank 1
Nikolas G asked on 23 Oct 2009, 03:51 PM
Hi I have a RadCalendar and I want to fire a tooltip with the onDateClick Event of RadCalendar.
The problem is that when I click on a date of RadCalendar the tootip is being shown only for 2 seconds.
Any ideas ??
Here is my code

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

    <script type="text/javascript">
        
        function Calendar_OnDateClick(element) {
            var tooltip = $find("<%=RadToolTip1.ClientID%>");
            tooltip.show();
        }
    </script>
    </telerik:RadCodeBlock>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
  
    <telerik:RadCalendar ID="RadCalendar1" runat="server"
        Skin="Web20" AutoPostBack="true">
        <ClientEvents OnDateClick="Calendar_OnDateClick" />
    </telerik:RadCalendar>

    <telerik:RadToolTip ID="RadToolTip1" runat="server" Font-Bold="true" Font-Size="Medium"
        ShowEvent="FromCode" ForeColor="DarkGreen" Height="100px" AutoTooltipify="false">
    </telerik:RadToolTip>
    </form>
</body>
</html>

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 26 Oct 2009, 07:51 AM
Hello Nikolas,

The AutoPostBack of the calendar triggers the dateclick server event, causing the tooltip to hide. So, either set the AutoPostBack property to false or try the following code:
js:
function Calendar_OnDateClick() 
    { 
         var tooltip = $find("<%=RadToolTip1.ClientID%>"); 
         tooltip.show(); 
          
         return false
    } 

Thanks
Shinu.
0
Nikolas G
Top achievements
Rank 1
answered on 26 Oct 2009, 08:44 AM
Hi shinu,

Thanx for the interest but none of your solutions worked.The problem still remains. Any other ideas??

Thanx Nikolas
Tags
Calendar
Asked by
Nikolas G
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Nikolas G
Top achievements
Rank 1
Share this question
or