We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

DropDownCalendarControl years dropdown

Thread ID:

Created:

Updated:

Platform:

Replies:

68365 Sep 19,2007 09:31 AM Sep 24,2007 09:30 AM ASP.NET Web Forms (Classic) 1
loading
Tags: Tools
luchiian
Asked On September 19, 2007 09:31 AM

Hi,
I am using DropDownCalendarControl and I se current Value to be DateTime.Now. In years dropdown I see years from 2002-2011. The number of years listed in years dropdown can be changed? I need to use it to select birth date and it's possible that the user want to select 1940 and for that, he need to pres Prev arrow too many times.

There is a solution on that?

Thank you.

Suresh Sekarean [Syncfusion]
Replied On September 24, 2007 09:30 AM

Hi Iryna,

Currently DropDownCalendar Control do not support to specify the number of combo items for the year section.

Using reflection, We can modify the number of Combo Items to be shown in the DropDownCalendar control. Please refer the below code snippet.

[C#]

DropDownCalendarControl DropDown = new DropDownCalendarControl();
//Access the variable 'm_iCountYearInCombo' which specify the number of combo items for the year section
FieldInfo count_Years = DropDown.GetType().GetField("m_iCountYearInCombo", BindingFlags.Instance | BindingFlags.NonPublic);
//Set new value to this variable
count_Years.SetValue(DropDown, 70);

Please refer the below sample,

http://websamples.syncfusion.com/samples/Tools.Web/5.2.0.25/F68365/main.htm

Sorry for the inconvenience if any caused.

Thanks for using Syncfusion products.

Thanks,
Sureshsekaran.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;