1
I’m trying to fill in the input
datetime-local
but the field is blank, I tried to command the format american and brazilian but it doesn’t come at all.
in the database is stored in American format: 2017-02-20 19:19:00
and in 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>
on that line I have tried to format in some formats but without success.
Friend, could you put the full code ? It would be easier for us to help you
– Alisson Acioli
the full code of the display? I will put there
– Danilo