This topic is locked

Range of 100 years in calendar

11/30/2006 7:29:00 AM
PHPRunner General questions
Pfeiffer author

Hello,
which line do I have to change in newest PHPRunner if a need a range of 100 years in popup calendar ??
Best regards

Uwe Pfeiffer

J
Jane 11/30/2006

Uwe,
to change year radius in the datapicker open calendar.html file, find following lines:

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

var lo=currentyear-100;

var hi=currentyear+10;



and replace 100 and 10 with your values.

Pfeiffer author 12/1/2006

Uwe,

to change year radius in the datapicker open calendar.html file, find following lines:
and replace 100 and 10 with your values.


The calender is now okay but the popup-window of

Day month year in EDIT/ADD-mask has not the same range than the calendar in the year.

So there must be an additional change in source code to synchronize the year input field to calender.
Best regards

Uwe Pfeiffer

J
Jane 12/1/2006

Uwe,
open include/commonfunctions.php file, find WriteYears function and change the following lines:

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

if($y && $firstyear>$y-5)

$firstyear=$y-10;

$lastyear=$tm["tm_year"]+1900+10;