Concrete5 5.6.3.1 oldest date is 2004 only [RESOLVED]
Permalink
If I use the built in form the oldest date that can be picked is 2004 only.
If I use Formidable, the oldest date that can be picked is 1970 only.
These problems did not exist before the upgrade
If I use Formidable, the oldest date that can be picked is 1970 only.
These problems did not exist before the upgrade
I upgraded from 5.6.2, I think. I am sure the problem was not there before with a different theme installed because I have a member who was born in 1950 and I got his membership with the correct date. But I just installed the latest one with the default theme, and the problem is there.
OK, strange. Maybe these people have just written the date themselves and not selected it from the date picker?
The earliest commit in github (back from 2011) that has changed the jQuery datepicker shows its year range is +/- 10 years from the current date. It seems this setting has not changed since. It's the default "yearRange" option in jquery.ui.js for the datepicker.
The earliest commit in github (back from 2011) that has changed the jQuery datepicker shows its year range is +/- 10 years from the current date. It seems this setting has not changed since. It's the default "yearRange" option in jquery.ui.js for the datepicker.
Is this another side effect of the datepicker issues?
http://www.concrete5.org/developers/bugs/5-6-3/date-picker-cant-be-...
https://github.com/concrete5/concrete5/pull/1670/files...
http://www.concrete5.org/developers/bugs/5-6-3/date-picker-cant-be-...
https://github.com/concrete5/concrete5/pull/1670/files...
Actually they can't. In that version which the one born in 1950 submitted, he had to click on the year, month and date -- he was not allowed to write it.
Anybody from the core developer help fix this problem. Now all members born prior to 1970 can't their birth year correctly.
Anybody from the core developer help fix this problem. Now all members born prior to 1970 can't their birth year correctly.
The post referred to by cmeritt worked but the line code number has changed.
http://www.concrete5.org/community/forums/customizing_c5/datepicker...
In the 5.6.3.1 open <site_root>/concrete/helpers/form/date_time.php. If you only see few lines of code it means you opened the wrong one. Look for the correct one -- it is there.
The original line 152 reads:
Replaced with this one:
Line 209 that reads:
Replace with the same code as done earlier:
http://www.concrete5.org/community/forums/customizing_c5/datepicker...
In the 5.6.3.1 open <site_root>/concrete/helpers/form/date_time.php. If you only see few lines of code it means you opened the wrong one. Look for the correct one -- it is there.
The original line 152 reads:
if ($calendarAutoStart) { $html .= '<script type="text/javascript">$(function() { $("#' . $id . '_dt").datepicker({ dateFormat: \'' . DATE_APP_DATE_PICKER . '\', changeYear: true, showAnim: \'fadeIn\' }); });</script>';
Replaced with this one:
if ($calendarAutoStart) { $html .= '<script type="text/javascript">$(function() { $("#' . $id . '_dt").datepicker({ dateFormat: \'' . DATE_APP_DATE_PICKER . '\', changeYear: true, showAnim: \'fadeIn\', yearRange: \'c-100:c+0\' }); });</script>';
Line 209 that reads:
if ($calendarAutoStart) { $html .= '<script type="text/javascript">$(function() { $("#' . $id . '").datepicker({ dateFormat: \'' . DATE_APP_DATE_PICKER . '\', changeYear: true, showAnim: \'fadeIn\' }); });</script>';
Replace with the same code as done earlier:
if ($calendarAutoStart) { $html .= '<script type="text/javascript">$(function() { $("#' . $id . '_dt").datepicker({ dateFormat: \'' . DATE_APP_DATE_PICKER . '\', changeYear: true, showAnim: \'fadeIn\', yearRange: \'c-100:c+0\' }); });</script>';
I see the same in 5.6.1.2.