Hi,
I have a simple RadDatePicker for which i add special days on the server side code. I intentionally make couple of days to be IsDisabled - true. On the aspx side, i applied the DisabledDayStyle css. But this class gets applied only for the first time when we load the datetime control. If i check for different months that was kept disabled, this class wasn't getting applied. How can we achieve this?
I know we have to do something on clientevent - ondayrender event but how do i actually capture the element? Let me know how do i proceed on this. I somehow do not want to again check for special days on the client side. Any code example would help.
.ASPX page:
.CS
Regards,
Kishan G K
I have a simple RadDatePicker for which i add special days on the server side code. I intentionally make couple of days to be IsDisabled - true. On the aspx side, i applied the DisabledDayStyle css. But this class gets applied only for the first time when we load the datetime control. If i check for different months that was kept disabled, this class wasn't getting applied. How can we achieve this?
I know we have to do something on clientevent - ondayrender event but how do i actually capture the element? Let me know how do i proceed on this. I somehow do not want to again check for special days on the client side. Any code example would help.
.ASPX page:
<
head
runat
=
"server"
>
<
title
></
title
>
<
style
type
=
"text/css"
>
.RadCalendar_Default .rcMainTable tr .DisabledClass a
{
color: #ebe6ca;
}
</
style
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
telerik:RadScriptManager
ID
=
"ScriptManager"
runat
=
"server"
>
</
telerik:RadScriptManager
>
<
telerik:RadDatePicker
ID
=
"radEffDate"
runat
=
"server"
MinDate
=
"1900-01-01"
Culture
=
"en-US"
>
<
Calendar
runat
=
"server"
>
<
ClientEvents
/>
<
DisabledDayStyle
CssClass
=
"DisabledClass"
/>
</
Calendar
>
<
DateInput
Enabled
=
"false"
runat
=
"server"
>
</
DateInput
>
</
telerik:RadDatePicker
>
</
div
>
</
form
>
</
body
>
.CS
if (!IsPostBack)
{
radEffDate.SelectedDate = DateTime.Now;
RadCalendarDay r = new RadCalendarDay();
r.Date = DateTime.Parse("08/09/2011");
r.IsSelectable = false;
r.IsDisabled = true;
radEffDate.Calendar.SpecialDays.Add(r);
RadCalendarDay r2 = new RadCalendarDay();
r2.Date = DateTime.Parse("07/09/2011");
r2.IsSelectable = false;
r2.IsDisabled = true;
radEffDate.Calendar.SpecialDays.Add(r2);
}
Regards,
Kishan G K