Change color of active days in calendar

2 posts, 0 answers
  1. Patrick Hone
    Patrick Hone avatar
    1 posts
    Member since:
    Jul 2007

    Posted 27 Sep 2009 Link to this post

    Hi there,

    We are using the RadCalendar, Version: 2008.2 1001 and have managed to set a dynamic date range where the inactive days are faded and the active days bolded. 

    There is the class...

    .outOfRange_Telerik span

    which sets the inactive days to a certain colour. And.....

    .TableLayout_Telerik a,
    .TableLayout_Telerik span

    Which sets the active days in the range to a another colour.

    Now in the active date range only some of the days are actually active where the user can physically click on the days but we are not sure whether or not we can set these days to a specific colour in the css as well. Can this be done?

    Many thanks,

  2. Dimo
    Dimo avatar
    8458 posts

    Posted 28 Sep 2009 Link to this post

    Hello Patrick,

    You can use the server and client DayRender events to modify the appearance of calendar days:

    The server DayRender event is used for the Calendar's initial look, while the client event is used when navigating to other months on the client.

    The recommended thing to do is set a custom CSS class for given days (applied to the <td>) and use a CSS rule to modify the styles of the <a> or <span> elements inside the table cell.

    Best wishes,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top