Calendar-Changing BackgroundColor of Date Cells

2 posts, 0 answers
  1. Lama Chandrasena
    Lama Chandrasena avatar
    3 posts
    Member since:
    Jun 2010

    Posted 26 Jul 2015 Link to this post


    I have an event handler to capture when a date is selected:

    _calendar.SelectionChanged += async (object sender, ValueChangedEventArgs<object> e) => {

      // I want to change the background color of this date cell. 



    How can I change the color of each cell when a date is selected?



  2. Rosy Topchiyska
    Rosy Topchiyska avatar
    547 posts

    Posted 29 Jul 2015 Link to this post

    Hi Lama,

    Thank you for writing.

    You can try with the RadCalendar.SetStyleForCell property. Here is an article from our online documentation with an example: Calendar Cell Styling

    In the method that evaluates cell styles you can check if the cell is of CalendarDateCell type, that has IsSelected property.

    I hope this helps.

    Rosy Topchiyska
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
Back to Top