But like below in the date field appears "dd MM yyyy - hh:ii" instead of appear the date. Do you know why?
Because that's what you're telling it to do?
$conference->start_date->formatLocalized('dd MM yyyy - hh:ii')
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have the format in datetime picker like "format: "dd MM yyyy - hh:ii" and to store the date in the database is used the format " 'start_date' => Carbon::createFromFormat('d F Y - H:i', $request->start_date), ".
In the conference details page I want to show the stored date in db. But like below in the date field appears "dd MM yyyy - hh:ii" instead of appear the date. Do you know why?
<div class="form-row">
<div class="form-group col-md-6">
<label for="start_date">Start date</label>
<div class="input-group date" data-provide="datepicker">
<input type='text' onkeydown="event.preventDefault()"
name="start_date" value="{{!empty($conference->start_date) ? $conference->start_date->formatLocalized('dd MM yyyy - hh:ii'): ''}}
"
class="form-control" placeholder="DD/MM/YYY" />
<span class="input-group-addon"><i class="fa fa-calendar text-primary" aria-hidden="true"></i></span>
</div>
</div>
<div class="form-group col-md-6">
<label for="end_date">End date
<div class="input-group date" data-provide="datepicker">
<input type='text' class="form-control"
value=" {{!empty($conference->start_date) ? $conference->start_date->formatLocalized('dd MM yyyy - hh:ii'): ''}}
" name="end_date" placeholder="DD/MM/YYY"/>
<span class="input-group-addon"><i class="fa fa-calendar text-primary" aria-hidden="true"></i></span>
</div>
</div>
</div>
Please or to participate in this conversation.