User tests: Successful: Unsuccessful:
/media/system/js/fields/calendar.js at lines 861 and 864 call
date.getOtherFullYear(this.params.dateType, year);
But this function defined in
/media/system/js/fields/calendar-locales/date/jalali/date-helper.js
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.
None
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript |
@franz-wohlkoenig Done.. sry ;)
Please use the following tool to compile/include the minified version.
https://skalman.github.io/UglifyJS-online/
Labels |
Added:
?
|
Fixed, tested and updated
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).
@dgrammatiko
can you have a look please?
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Status "Ready To Commit".
Labels |
Added:
?
|
Thanks for fixing the calendar.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-09-17 16:27:47 |
Closed_By | ⇒ | HLeithner |
Have in mind that the minified version (media/system/js/fields/calendar.min.js - NOT PROVIDED) should be updated aswell