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

[Solved] Change a specific day style in RadCalendar

1 Answer 126 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 16 May 2009, 10:00 AM
Hi

Is it possible to alter the style (make bold etc) of a day in the RadCalendar, based on a date found when looping through the recordsets that build my appointments?

Thanks

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 16 May 2009, 03:41 PM
Hello Greg,

Please, refer to the First look demo:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/outlook2007/defaultcs.aspx

The functionality which you need is already implemented in AppointmentDataBound by setting the CssClass property of the calendar day in case there are appointments for that day:
 protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)  
        {  
            RadCalendarDay radCalendarDay = new RadCalendarDay(RadCalendar1);  
            radCalendarDay.Date = e.Appointment.Start;  
            radCalendarDay.ItemStyle.CssClass = "DayWithAppointments";  
            RadCalendar1.SpecialDays.Add(radCalendarDay);  
            RadCalendar2.SpecialDays.Add(radCalendarDay);  
 

In order to visually distinguish days with appointments you need to define the DayWithAppointments class. For example, try the following:
.DayWithAppointments a  
    {  
        color:Red !important;  
        
     } 


Best wishes,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Scheduler
Asked by
Andrew
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or