How to Disable Hover?

4 posts, 1 answers
  1. Richard
    Richard avatar
    60 posts
    Member since:
    Feb 2008

    Posted 17 Mar 2008 Link to this post

    I need to disable the hover effects in the calendar, but the method given in the code samples for the old RadCalendar control gives a javascript error with the Prometheus control.  Altering the css to be the same as the default css is not a solution as the hover effect still happens and wipes out my custom highlighting.
  2. Answer
    Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 18 Mar 2008 Link to this post

    Hi Richard,

    You only need to modify the namespace of the RenderDay class as it is different for the Prometheus version of the control:

    <script type="text/javascript">  
    window.onload = function()  
    {  
        Telerik.Web.UI.Calendar.RenderDay.prototype.ApplyHoverBehavior = function(){return false;};  
    }  
    </script>  
     
    <telerik:RadCalendar ID="RadCalendar1" runat="server"
    </telerik:RadCalendar> 


    Hope this helps.


    All the best,
    Manuel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Richard
    Richard avatar
    60 posts
    Member since:
    Feb 2008

    Posted 18 Mar 2008 Link to this post

    That's great, Manuel, thanks.  Now I see another problem though.  I am trying to set properties in css for the table.calendar_Wrapper border but they have no effect.  When I view source on the page it looks like the control is injecting border="0" style="border-width:0px;border-collapse:collapse;"
  4. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 19 Mar 2008 Link to this post

    Hello Richard,

    You can apply the desired border settings like this:

    <head runat="server"
        <title>Untitled Page</title> 
        <style type="text/css"
        div table.applyBorder 
        { 
            border: 1px solid red !important; 
        } 
        
        </style> 
    </head> 
    <body> 
        <form id="form1" runat="server"
            <div> 
             
                <asp:ScriptManager ID="ScriptManager1" runat="Server"
                </asp:ScriptManager> 
                 
                <telerik:RadCalendar ID="RadCalendar1" runat="server" CssClass="applyBorder"
                </telerik:RadCalendar> 
     
            </div> 
        </form> 
    </body> 
    </html> 


    Hope this helps.


    Greetings,
    Manuel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top