Tuesday, August 01, 2006

SelectedDate property of Calendar control (ASP.NET 2.0)

Another day, another trick...
Spent a while in attempts to select a specific date in ASP.NET Calendar control. And it appears SelectedDate property is ignoring assigned value if it's not a midnight of the day. Date property of DateTime class is useful for that.

Here is a snippet:

_calendar.SelectedDate = DateTime.Now.Date;

Labels: , ,

0 Comments:

Post a Comment

<< Home