Have you checked if the milliseconds are stored in the database with the right values ?
Have you checked the date and time returned by the form (dd($start_time)) ?
Hello, I have a textinput, type datetime-local and with a step of .001 in which I store the date-time with milliseconds. When creating a new record I have no problems, but if, for example, I go to edit and modify only the milliseconds, it is not updated in the database. But for example if I update the seconds along with the milliseconds, then the milliseconds are updated.
Model:
protected $casts
= [
'start_time' => 'datetime:Y-m-d H:i:s.v',
];
I have activated the mysql log and the new time does not arrive with the changed milliseconds.
I'm using filamentphp form.
Is seems that the update is not considered a change and therefore start_time is not dirty.
Try setting the $dateFormat property on the model so comparisons are made down to milliseconds:
protected $dateFormat = 'Y-m-d H:i:s.v';
Please or to participate in this conversation.