Radcalendar hover issue

3 posts, 0 answers
  1. Aditya
    Aditya avatar
    20 posts
    Member since:
    May 2011

    Posted 16 Apr 2012 Link to this post

      I'm using RadCalendar to select highlighted days. The issue is that whenever I hover on these highlighted dates., the date gets selected, which shouldn't be the case. I want the date to get selected only when i click it but no on hover. How can i overcome this issue..??
    I'm using this css class to highlight special days
       .CalendarHolidays a
            color: red !important;
            font-weight: bold !important;
            background-color: #f2f2f2 !important;

  2. Vasil
    Vasil avatar
    1642 posts

    Posted 16 Apr 2012 Link to this post

    Hello Aditya,

    You could disable the applying of the rcHover class to the cells by overriding the ApplyHoverBehavior function:

    Telerik.Web.UI.Calendar.RenderDay.prototype.ApplyHoverBehavior = function(){return false;};

    Kind regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. James
    James avatar
    20 posts
    Member since:
    Jan 2012

    Posted 18 Dec 2012 Link to this post

    This problem occurs when using CSS to highlight special days. If you highlight the days through code, hovering over the dates will not change the colour back. Thought I would reply to this post as I have seen this question repeated over and over again and the only solution telerik provide is via CSS which with telerik stuff can be a pain sometimes. The code way is so much simpler:

    allExpiryDates is a list of datetimes and calendarEvents is the id of my radcalendar

       public void RadCalendar_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)
            foreach (DateTime expiryDate in allExpiryDates)
                DateTime dateToHighlight = new DateTime();
                dateToHighlight = expiryDate;
                RadCalendarDay calendarDay = new RadCalendarDay();
                calendarDay.Date = dateToHighlight;
                calendarDay.ItemStyle.BorderColor = Color.Blue;
Back to Top