This topic is locked

Limit range of years in dropdown box

6/5/2008 10:31:04 AM
PHPRunner General questions
V
verkerk author

In my database application I use the combined dropdown box and the date picker to select a certain date. By default both option have a range of -100 to + 10 years. In the datepicker (calendar.html) you can easely change this range, but I cannot find out how to do this in the dropdown boxes (include\Calendar.js ??).

Somebody figured out how to solve this?

B
bochaka 6/5/2008

Hi Tom

goto the output\include folder , find the file called commonfunctions.php , open it in your word editor (notepad etc) THEN look for this text

// write years dropdown

it is about half way down the page
the line i edited i changed the value which was +1900-100 to this +2000-100
$firstyear=$tm["tm_year"]+2000-100;

this gave me a start year of 2008

Hope this helps