PDA

Click to See Complete Forum and Search --> : [resolved] Calendar1.SelectedMonth ??


MrGTI
Oct 5th, 2005, 10:06 AM
The calendar control has a SelectedDate property, but why isn't there a SelectedMonth property? I want the calendar to display the month of the selected date, not this month.

Try this,... Drop a Calendar control on a WebForm, and in the Page_Load, but this line of code:
Calendar1.SelectedDate = Now.AddDays(45)
Now when you run the project, the page loads and displays the current month, but the selected date is next month!

Anyone have any ideas?

MrGTI
Oct 5th, 2005, 10:27 AM
I managed to figure it out,... or at least i solved the problem. :)

'Gives the control a selected date of 45 days from today
Calendar1.SelectedDate = Now.AddDays(45)

'Makes the control display the same month as the selected date
Calendar1.TodaysDate = Calendar1.SelectedDate