Skip to content

Commit

Permalink
Fix for minyear and maxyear in the calendar.js (#26119)
Browse files Browse the repository at this point in the history
/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
  • Loading branch information
pinta83 authored and HLeithner committed Sep 17, 2019
1 parent 7d8b1b8 commit f976816
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions media/system/js/fields/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -858,10 +858,10 @@

if (year < this.params.minYear) { // Check min,max year
year = this.params.minYear;
date.getOtherFullYear(this.params.dateType, year);
date.setOtherFullYear(this.params.dateType, year);
} else if (year > this.params.maxYear) {
year = this.params.maxYear;
date.getOtherFullYear(this.params.dateType, year);
date.setOtherFullYear(this.params.dateType, year);
}

this.params.firstDayOfWeek = firstDayOfWeek;
Expand Down
Loading

0 comments on commit f976816

Please sign in to comment.