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

Form date field doesn't support CarbonImmutable #703

Open
mxaGianluca opened this issue Feb 2, 2022 · 0 comments
Open

Form date field doesn't support CarbonImmutable #703

mxaGianluca opened this issue Feb 2, 2022 · 0 comments

Comments

@mxaGianluca
Copy link

When passing an immutable Carbon object into the Form::date field, it will try and validate the input by checking if it's an instance of DateTime which doesn't pass.

if ($value instanceof DateTime) {

This could be fixed by checking if the value implements DateTimeInterface, then it would support both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant