DatePicker problem accessing the field from the relationship
I'm struggling with this specific problem on DatePicker, so as last resort i'm trying to write there.
Basically I have a birth_date (type date) field on the sql.
I'm accessing this field on two different resource.
The first one is the resource itself of the table, and works correctly:
the DatePicker is correctly populated with the date that I have on the database.
The second one give the problems:
The relation on the model is that one:
If I compare the date on both field (working/no-working, dumping the value on formatStateUsing) i have the exaclty date:
There is some hero that can understand what I wrong?
ty
Solution:Jump to solution
solved with this casting on the model:
'birth_date' => 'date:Y-m-d'
no idea why i needed to explicit the casting format, otherwise from the relations the picker can't grab the correct one....
1 Reply
Solution
solved with this casting on the model:
'birth_date' => 'date:Y-m-d'
no idea why i needed to explicit the casting format, otherwise from the relations the picker can't grab the correct one.