User tests: Successful: Unsuccessful:
/media/system/js/fields/calendar.js at lines 861 and 864 call
But this function defined in
does not have a second parameter - year, so it can not be changed...
Here's a fix for this issue...
Pull Request for Issue #19926 .
Changes 2 lines of code so the picker would work as inteded
Create a datepicker input field with attribute maxyear set to -5
When the field gets rendered the expected result of the initially displayed year - is the current year -5 years as defined.
The year title is ok, but the calendar displayed does not reflect the shown year, but the current month is displayed. When you click the previous year button, you have to click 5 times until it gets to the right year, and then starts working as expected. It also lets you pick the date outside of range. This fixes all these issuse, as the wrong calendar month never gets displayed.
Have in mind that the minified version (media/system/js/fields/calendar.min.js - NOT PROVIDED) should be updated aswell
I have tested this item
Hint for other testers: Instead of creating a field, you can modify field "created" in file "administrator/components/com_contact/models/forms/contact.xml" by adding property
maxyear="-19" (orn other values). Then create a contact and play with the created date calendar field as described in the testing instructions and the issue.
After having applied the patch e.g. with patchtester, you might have to clear your browser cache in order to use the changed js (or minified js if debug is switched off).
|Status||Pending||⇒||Ready to Commit|
|Status||Ready to Commit||⇒||Fixed in Code Base|
|Closed_Date||0000-00-00 00:00:00||⇒||2019-09-17 16:27:47|