ASP.NET 2.0 Calendar SelectedDateStyle

H

Hardy Wang

Hi All,
I have a calendar control in my web form,
<asp:Calendar ID="cal" runat="server" BorderStyle="Groove"
ShowGridLines="True">
<TodayDayStyle CssClass="CalendarToday" />
<DayHeaderStyle CssClass="CalendarHeader" />
<DayStyle CssClass="CalendarDay" />
<OtherMonthDayStyle CssClass="CalendarOtherMonthDay" />
<SelectedDayStyle CssClass="CalendarSelectedDay" />
<TitleStyle CssClass="CalendarHeader" />
</asp:Calendar>

I have a CSS file with difinition
.CalendarHeader
{
font-size: 9pt;
font-family : Verdana, Arial;
font-weight : bold ;
}
.CalendarSelectedDay
{
font-size: 9pt;
font-family : Verdana, Arial;
font-weight : normal ;
background-color : #ffffbf;
}
.CalendarToday
{
font-size: 9pt;
font-family : Verdana, Arial;
font-weight : normal ;
background-color : #C0FFFF;
}
.CalendarDay
{
font-size: 9pt;
font-family : Verdana, Arial;
font-weight : normal ;
background-color : #e9e9e9;
}
.CalendarOtherMonthDay
{
font-size: 9pt;
font-family : Verdana, Arial;
font-weight : normal ;
color : red;
background-color : #f7f7f7;
}

But the rendered HTML code is always like below, with some extra styles
attached to Selected Date only. All other dates blocks are good as what I
need.
<td class="CalendarSelectedDay" align="center"
style="color:White;background-color:Silver;width:14%;">
<a
href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$calPurchaseDate','2169')"
style="color:White" title="December 09">9</a>
</td>

Any idea what caused this?

Regards

Hardy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top