Skip to content

Commit

Permalink
fix compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
sinacek committed Nov 22, 2023
1 parent 09500b6 commit 743c71a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/AccountancyModule/Components/FormControls/DateControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Cake\Chronos\ChronosDate;
use DateTimeImmutable;
use InvalidArgumentException;
use Nette\Forms\Controls\BaseControl;
use Nette\Forms\Controls\DateTimeControl;
use Nette\Utils\Html;

use function sprintf;
Expand All @@ -16,7 +16,7 @@
/**
* Datetime picker with automatic string <-> Date conversion
*/
class DateControl extends BaseControl
class DateControl extends DateTimeControl
{
private const DATE_FORMAT = 'd.m.Y';

Expand Down
5 changes: 4 additions & 1 deletion app/AccountancyModule/Forms/CustomControlFactories.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@

trait CustomControlFactories
{
public function addDate(string $name, string|null $label = null): DateControl
/**
* {@inheritDoc}
*/
public function addDate(string $name, $label = null): DateControl
{
return $this[$name] = new DateControl($label);
}
Expand Down

0 comments on commit 743c71a

Please sign in to comment.