Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix for minyear and maxyear in the calendar.js #26119
/media/system/js/fields/calendar.js at lines 861 and 864 call
But this function defined in
Here's a fix for this issue...
Pull Request for Issue #19926 .
Summary of Changes
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.
Documentation Changes Required
/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... Fixes issue: #19926
I have tested this item
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).
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26119.