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

How to change special dates style?

1 Answer 95 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Carlos Marchi
Top achievements
Rank 1
Carlos Marchi asked on 12 Nov 2009, 01:06 PM
Hi Everybody,

I developed a little project for try to undertand better the working of radcalendar control. In this development I havent knw how to change the special dates style.

In the page, there are two radcalendar controls and a button. The user selects any date from first radcalendar and then the user clicks on button.

There is a event button that gets all dates and then adds as special dates in the second  radcalendar. Well, both radcalendar control has the style of Web20. I'd like that the special dates will be the same style of disable dates or dates that be outside of period of time.

This is the event button code:

foreach

 

(RadDate item in RadCalendar1.SelectedDates)

 

{

 

RadCalendarDay day = new RadCalendarDay();

 

day.Date = item.Date;

day.IsDisabled =

true;

 

day.IsSelectable =

false;

 

day.ItemStyle.CssClass =

"calendarHolidays";

 

RadCalendar2.SpecialDays.Add(day);

 

}

Following, css:

 

.calendarHolidays

 

a

 

{

 

color: red !Important;

 

 

background-color: #f2f2f2 !Important;

 

}

this class is inside of Calendar.Web20 css.

Could anyone help me plase??/

Thank you for all attention,

Carlos

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 16 Nov 2009, 03:59 PM
Hello Carlos,

You can apply a special style to the special day, to simulate a disabled effect.
Additional information on the possible styling of the special days is demonstrated in the following example:
http://demos.telerik.com/aspnet-ajax/calendar/examples/functionality/specialdays/defaultcs.aspx

I hope it gets you started properly!

All the best,
Pavlina
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.
Tags
Calendar
Asked by
Carlos Marchi
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or