Thursday, March 22, 2012

Looping the calendar control

I want to loop through a calendar control and set certain dates to bold.

Something like:

For Each itemAs CalendarDayIn clndr.? item.boldThisDayNext

Have had a look around but can't find anything like this.

Cheers!

/Eskil

You could use the Calendar controls Calendar.OnDayRender method and set the style properties of the day see this MSDN article

http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.calendar.ondayrender.aspx


Yepp, that's it. Your link didn't work for (internal server error at Ms), but I'm guessing it has nothing to do with you. The exact same link when it showed up through some googling, did work though and it does indeed solve my problem.

http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.calendar.ondayrender.aspx

Thanks!

/Eskil

0 comments:

Post a Comment