Calendar month displayed

Nov 28, 2008 at 1:03 AM
I'm setting a calendar's SelectedDate programatically.

The annoying thing is, the SelectedDatedoes change, but not the "page/month it's displaying".
Say I selected "11th November 2008", then I programatically set the SelectedDate to "1t January 2006", the SelectedDate does change but the calendar still shows "November 2008".
How could I change the month displayed by the calendar?
Dec 1, 2008 at 6:37 PM
I think DisplayDate is the property you're looking for.
Feb 2, 2009 at 7:32 PM
I’m having same problem, but I was able to do it by setting both properties (is that valid) :

cal.DisplayDate =

DateTime.Today;

 

cal.SelectedDate =

DateTime.Today;

 

Feb 2, 2009 at 8:44 PM
Ho goodie, thanks for the tip!
Coordinator
Feb 2, 2009 at 10:08 PM
BaderMahayni, sure that is valid. DisplayDate and SelectedDate are treated differently to allow one to have a date selected while browsing other dates.

-Eric Fabricant, MSFT