Link to home
Create AccountLog in
Avatar of Grant Surridge
Grant SurridgeFlag for United Kingdom of Great Britain and Northern Ireland

asked on

ASP.Net Calendar Control - selectedDate doesn't auto focus

Hi

I have 2 calendar controls, and have this code in Page_Load

                calFrom.SelectedDate = DateTime.Today.AddDays(-30);
               
                calTo.SelectedDate = DateTime.Today;

The problem I have now, is that the From calendar control doens't auto focus on the month that I want. So the selected date of today - 30 (15th January), yet the page displays February without any date selected (unless I click previous month)

What code is needed to set the auto month focus to be that of the selected date ?

Thanks
Avatar of Manoj Patil
Manoj Patil
Flag of India image

ASKER CERTIFIED SOLUTION
Avatar of Manoj Patil
Manoj Patil
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account