Highlighted Dates

3 posts, 0 answers
  1. Jeff
    Jeff avatar
    6 posts
    Member since:
    May 2016

    Posted 27 May Link to this post

    I am pulling in dates from a database to highlight holidays in RadCalendar1_DayRender.  When I mouseover a highlighted date, the highlight disappears.  Is there a setting I need to keep the highlight date highlighted?

    Thank you

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 31 May Link to this post

    Hi Jeff,

    When the user hovers over the dates a .rcHover CSS class is applied to them. In order to override the styles applied on hover you should use a selector with higher specificity.

    The code snippets below outline the approach:

    protected void RadCalendar1_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)
    {
        if (e.Day.IsToday)
        {
            e.Cell.CssClass = "customColor";
        }
    }


    .RadCalendar table .rcRow .customColor,
    .RadCalendar table .rcRow .customColor a {
        background-color: red;
    }


    Regards,
    Viktor Tachev
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jeff
    Jeff avatar
    6 posts
    Member since:
    May 2016

    Posted 31 May in reply to Viktor Tachev Link to this post

    That works.  Thanks!
Back to Top