Skip to content

Commit

Permalink
Update JHtml::calendar to support relative years limits (#19847)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggppdk authored and Michael Babker committed Mar 17, 2018
1 parent 6e5ac32 commit 286c8e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/src/HTML/HTMLHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,8 @@ public static function calendar($value, $name, $id, $format = '%Y-%m-%d', $attri
$hint = isset($attribs['placeholder']) ? $attribs['placeholder'] : '';
$class = isset($attribs['class']) ? $attribs['class'] : '';
$onchange = isset($attribs['onChange']) ? $attribs['onChange'] : '';
$minYear = isset($attribs['minYear']) ? $attribs['minYear'] : null;
$maxYear = isset($attribs['maxYear']) ? $attribs['maxYear'] : null;

$showTime = ($showTime) ? "1" : "0";
$todayBtn = ($todayBtn) ? "1" : "0";
Expand Down Expand Up @@ -1081,6 +1083,8 @@ public static function calendar($value, $name, $id, $format = '%Y-%m-%d', $attri
'localesPath' => $localesPath,
'direction' => $direction,
'onchange' => $onchange,
'minYear' => $minYear,
'maxYear' => $maxYear,
);

return LayoutHelper::render('joomla.form.field.calendar', $data, null, null);
Expand Down

0 comments on commit 286c8e6

Please sign in to comment.