Skip to content

Commit

Permalink
Merge pull request #59 from olsonpm/fix-bday
Browse files Browse the repository at this point in the history
extend birthdate
  • Loading branch information
guilherme-gm authored May 12, 2024
2 parents 169f439 + c103deb commit e1d7896
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion themes/default/account/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

<tr>
<th><label><?php echo htmlspecialchars(Flux::message('AccountBirthdateLabel')) ?></label></th>
<td><?php echo $this->dateField('birthdate',null,0) ?></td>
<td><?php echo $this->dateField('birthdate',null,0,100) ?></td>
</tr>

<?php if (Flux::config('UseCaptcha')): ?>
Expand Down

1 comment on commit e1d7896

@xTararAisx
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isnt actually needed as you can pass the arguments in application.php

'ForwardYears'         => 15,                       // (Visual) The number of years to display ahead of the current year in date inputs.
'BackwardYears'        => 120,                       // (Visual) The number of years to display behind the current year in date inputs.

The correct usage, leveraging the default configuration, is:

dateField('birthdate', null, 0) ?>

This will make your code cleaner and easier to maintain. If you ever need to change the range of years, you can simply update your configuration file.

Please sign in to comment.