Digital Colony!

Set SelectedDate on ASP.NET Calendar Control to Today

When you want to set the default SelectedDate on an ASP.NET Calendar Control use DateTime.Today not DateTime.Now.
calReleaseDate.SelectedDate = DateTime.Today;

Labels:

AddThis Social Bookmark Button

2 Comments:

Anonymous Jyrki Heinonen said...

Thank you for this info! I've been tearing my hair because of this... Stupid decision from microsoft.

5/14/2008 2:00 AM

Blogger Andrew said...

wow. 3 hours of screwing with asp:Calendar and this is the solution. Rediculous

6/19/2008 2:59 PM

 

Post a Comment

 

Digital Colony Copyright © 1999-2008 XHTML   508
This site uses Blogger, which is not 100% XHTML compliant.
Try...Catch Disclaimer: For brevity many examples do not include error handling. That is your responsibility.