savannabits / filament-flatpickr

Extend your Filament Date-Picking with Flatpickr
MIT License
43 stars 31 forks source link

[Bug]: Mistake with method definition #69

Open career-180 opened 1 week ago

career-180 commented 1 week ago

What happened?

There is an error when I use the Flatpickr component because the definition of minDate is not correct:

public function minDate(Carbon|string|null $minDate|Closure): static
{
        $this->minDate = $minDate ? Carbon::parse($minDate) : $minDate;

         return $this;
}

The error is with the line of: public function minDate(Carbon|string|null $minDate|Closure): static

It should be: public function minDate(Carbon|string|null|Closure $minDate): static

How to reproduce the bug

Just initiate the component in any filament form

Package Version

3

PHP Version

8.2

Laravel Version

11

Which operating systems does with happen with?

No response

Notes

No response