This topic is locked

Shorten list of drop down years

4/15/2007 1:48:27 PM
PHPRunner General questions
rsawchuk author

Some of my users are complaining that they don't need to go back 100 years to select a year in the Calendar drop down list.
What file(s) and/or code do I need to modify to shorten this list?
Thanks,
Russ

Alexey admin 4/16/2007

Russ,
find and modify this snippet in calendar.html file:

var currentyear=(new Date()).getFullYear();

var lo=currentyear-100;

var hi=currentyear+10;

rsawchuk author 4/16/2007

Russ,

find and modify this snippet in calendar.html file:


Alexey,
Thanks, I had already tried that. This shortens the dropdown years list in the Datepicker only, but the long year list remains in the drop-down menu. I have looked everywhere but can't find the var "yearvalue_Dates".
Thanks.
Russ

Alexey admin 4/17/2007

Russ,
to alter dropdowns modify WriteYears function in include\commonfunctions.php file.

I.e. change this line there:

$firstyear=$tm["tm_year"]+1900-100;



to

$firstyear=$tm["tm_year"]+1900-10;

rsawchuk author 4/17/2007

That did it ... thanks.
Russ