Level 58
To display the already selected date in the input field, you can set the value attribute of the input field to the formatted date string. Here's an example:
<input type="date" name="start_date" value="{{ $competition->start_date ? $competition->start_date->format('Y-m-d') : '' }}">
Note that the value attribute should be set to the date string in the format "YYYY-MM-DD" for the input field to display the selected date.
1 like