Form submitting even though the date is required
Hi,
I used filament form builder to require a date input using DateTimePicker.
protected function getFormSchema(): array
{
return [
DateTimePicker::make('due_date')->required() // ... ]; } However, when the user dont fill in a date and submit, the form will still submit and will throw an error because I didnt set the date to be nullable. Is there a way so that the form will not submit when the user forget to fill in a date? I have already set the field as required as shown in the code above. I don't know what is missing.
DateTimePicker::make('due_date')->required() // ... ]; } However, when the user dont fill in a date and submit, the form will still submit and will throw an error because I didnt set the date to be nullable. Is there a way so that the form will not submit when the user forget to fill in a date? I have already set the field as required as shown in the code above. I don't know what is missing.
1 Reply
Do you have any browser console errors? and when you dd on the form submissions what data is entered for the datatimepicker field?