how to highlight in weekview

2 posts, 0 answers
  1. ganesh
    ganesh avatar
    21 posts
    Member since:
    Jun 2010

    Posted 13 Jan 2011 Link to this post

    hi team,

    i want to highlight the current date in weekview... as like outlook calendar ..


    is it possible?
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 13 Sep 2012 Link to this post

    Hi Ganesh,

    Try the following code snippet to achieve your scenario.

    CSS:
    <style type="text/css">
       .highlight 
            
                background: red !important
            
    </style>

    C#:
    protected void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
        {
            if (RadScheduler1.SelectedView == SchedulerViewType.WeekView)
            {
                if (DateTime.Compare(e.TimeSlot.Start.Date, DateTime.Today) == 0)
                {
                    e.TimeSlot.CssClass = "highlight";
                }
            }
        }

    Hope this helps.

    Regards,
    Princy.
Back to Top