Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
813
WebDateChooser Calender DropDown Year List
posted

Hi,

I have WebDateChooser on my page.

I want to show the complete list of year in calender of WebDateChooser from 1970 to current year,

I used this method to show that.

 

objControl.MinDate = new DateTime(1970, 1, 1);

objControl.MaxDate = new DateTime(DateTime.Now.Year, 12, 31);

objControl.CalendarLayout.DropDownYearsNumber = DateTime.Now.Year - 1970;

 

but with this it is now allowing me to enter a future date that is of 2009.

So what i want to do is want to allow to enter future date and show years in dropdown list from 1970 till current year in just one dropdown so user can choose any year from 1970 to current and user do not need to select year 2-3 times to go to previouse range which is of 10 years by default.

 

Thank you.