I'm trying to fill in the input
datetime-local
but the field is blank, I already tried to send it in the format American and Brazilian but it does not come at all.
in the database is stored in the American format: 2017-02-20 19:19:00
and in the html I try to insert like this:
<?php $date = new DateTime($situacao[0]['data_inicio']) ?>
<div class="form-group">
<label for="txtDataInicio" class="col-sm-2 control-label">Data Inicio</label>
<div class="col-sm-10">
<input type="datetime-local" class="form-control" id="txtDataInicio" name="txtDataInicio" placeholder="Nome da Função" value="<?php echo (empty($situacao[0]['data_inicio']))? set_value('txtDataInicio'): $date->format('y-M-dh:m') ?>">
</div>
</div>
In this line I've tried formatting in some formats, but without success.