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]: defaultDate for Range datepicker #38

Open
jucosatti opened this issue Aug 21, 2023 · 1 comment
Open

[Bug]: defaultDate for Range datepicker #38

jucosatti opened this issue Aug 21, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jucosatti
Copy link

What happened?

I'm trying to use a range datepicker for a form, but when I pass a value (an array of 2 dates, as it mention in Flatpickr docs) it doesn't show anything.
The array is a attribute in the model joining to date fields.

Is it a bug or I'm doing something wrong?

How to reproduce the bug

.

Package Version

3

PHP Version

8.1

Laravel Version

10

Which operating systems does with happen with?

macOS

Notes

No response

@jucosatti jucosatti added the bug Something isn't working label Aug 21, 2023
@bytemewebdev
Copy link

for the meantime I used this

->formatStateUsing(function (string $state): string {
                                [$from, $to] = json_decode($state);

                                return "$from to $to";
                            })

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

2 participants