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 0d10d15 commit 369c2b6
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 @@ -6,7 +6,7 @@

use Cake\Chronos\ChronosDate;
use InvalidArgumentException;
use Nette\Forms\Controls\BaseControl;
use Nette\Forms\Controls\DateTimeControl;
use Nette\Utils\Html;

use function sprintf;
Expand All @@ -15,7 +15,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 369c2b6

Please sign in to comment.