-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Cast Date Field #82
Comments
How can we solve this issue? |
Hey anyone reading this; I fixed it by extending the DateTime field and casting it;
|
I've tried extending the DateTime field as @GarethSomers did which removes the error but formats the data in a way that means it does not appear at all in the form or on the details page after saving. So instead I just overwrote the constructor method to remove the casting check:
Not entirely happy with this solution as I assume there's a good reason for the check but it's the best I can do for now. Would be great if someone knows how to resolve the underlying problem, because currently this package simply doesn't support DateTIme fields. |
How do you add a date field with this package? You need to cast the filed as a date so not sure where to put it since there is no model?
returns the error
Date field must be casts as Date in eloquent model
The text was updated successfully, but these errors were encountered: