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;
This entry was posted in ASP.NET and tagged , , . Bookmark the permalink.

One Response to Set SelectedDate on ASP.NET Calendar Control to Today

  1. Mohammad Rafi Abd. Alim says:

    I’ve been trying all over the place with DateTime.Now. Doesn’t work. Change it to DateTime.Today, it works. Thanks.