Asp.Net Calender, how to display 5 lines if there are only 5 lines in one month?

J

Jack

To whom may concern:


In Asp.Net Calender control, how to display 5 lines if there are only 5
lines in one month? Now there are 6 lines even that I don't show the
data in other months.

Thanks in advance!


Jack
2005-10-11
 
J

Juan T. Llibre

All months which begin on a Friday or a Saturday
need to display 6 lines, because there's 4 complete
weeks and 2 partial weeks in them.

To display a calendar so that the months which *can* display in
5 lines (the months which start on Sun, Mon, Tue, Wed or Thu)
do display in 5 lines, set the ForeColor and BackColor properties
for the "OtherMonthDay Style" to white.

<asp:Calendar ID="Calendar1" runat="server" OtherMonthDayStyle-BackColor="White"
OtherMonthDayStyle-ForeColor="White"></asp:Calendar>

If you have set the Calendar's BackColor to any other color
but white, set the "OtherMonthDay Style" to whatever BackColor
you set the Calendar's BackColor to.
 
J

Juan T. Llibre

Hmmm...that's odd but, if that what it takes, fine.

See the calendar at :

http://asp.net.do/calendario/Calendario.aspx

It's created with only :

<asp:Calendar ID="Calendar1" runat="server" OtherMonthDayStyle-BackColor="White"
OtherMonthDayStyle-ForeColor="White"></asp:Calendar>

I didn't set ShowGridLines = False ... but it works.

In any case, I'm glad it's working, Jack.
 
J

Juan T. Llibre

I guess you'll have to write a Calendar of your own, then.

Why would your customer require gridlines ?

Talk your customer out of that.
It's not like gridlines are very functional, anyway.
 
J

Jack

:), in fact, I think Calender with GridLine is more beautiful than the
one without GridLine.
 
J

Jack

Yes, that's true, but that's why I post here.
If you can tell me how to custom Calendar, that's better. ;)
 

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,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top