Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Mistake with method definition #69

Closed
moez-c180 opened this issue Jun 18, 2024 · 7 comments
Closed

[Bug]: Mistake with method definition #69

moez-c180 opened this issue Jun 18, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@moez-c180
Copy link

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

@moez-c180 moez-c180 added the bug Something isn't working label Jun 18, 2024
@holmesadam
Copy link

I'm also having this issue with a fresh install - manually edited the vendor file whilst waiting for this to be fixed.

Any idea when you can fix this @coolsam726?

Thanks

@munchy5132
Copy link

Same here. Any update on this ?

@holmesadam
Copy link

holmesadam commented Jul 5, 2024

Same here. Any update on this ?

I ended up switching to dev branch where this is fixed

"savannabits/filament-flatpickr": "^3.x-dev,

@vaskaraminashvili
Copy link

same here

@alboxe
Copy link

alboxe commented Jul 8, 2024

same here. career-180 shows the solution: public function minDate(Carbon|string|null|Closure $minDate): static
Why is this little adjustement not applied to the latest version?

@BrendanBasson4
Copy link

same here

@coolsam726
Copy link
Contributor

Sorry guys, I have been quite swamped up. The fix is now released in 3.1.1
Thanks for the PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants