This topic is locked

Date Picker Drop Down Starting Year

9/22/2004 4:41:39 PM
ASPRunnerPro General questions
D
dlguild author

Hi,
Currently the drop down year starts with 1954 when using the date picker drop down format. Is it possible to change the starting year to something more current by altering the templates? Or do I have to modify the resultant code on each page to make the change?
Thanks for your help.
Dan

admin 9/22/2004

Dan,
you can edit include/..._aspfunctions.asp for this purpose.
In Function WriteYears(d, f) change the following line

for x=Year(d)-50 to Year(d)+50


to something like this:

for x=1901 to 2099

D
dlguild author 9/22/2004

Excellent! Thanks Sergey!

C
Colzie 1/26/2006

I found I also had to modify this code (2X) in aspfunctions.asp to get the picker to change the year properly

. . . curdate.getFullYear()+51; . . .


Change the 51 to adjust to your drop down list.