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

Highlighted Dates

2 Answers 58 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 27 May 2016, 02:04 PM

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 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 31 May 2016, 11:32 AM
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.
0
Jeff
Top achievements
Rank 1
answered on 31 May 2016, 02:53 PM
That works.  Thanks!
Tags
Calendar
Asked by
Jeff
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Jeff
Top achievements
Rank 1
Share this question
or