0
I have an agenda where I am using the Fullcalendar library (javascript) and when I click on an event I want more information of this to be displayed so far everything right now I have a field form
in a modal returned a database date but it returns as I will show below:
As the date is coming in my desired field:
My code until then:
eventClick: function(event, jsEvent, view){
$('#id').val(event.id);
$('#ccod').val(event.codigoCliente);
$('#mtitulo').val(event.title);
$('#autor').val(event.autor);
$('#inicioEdit').val(event.start);
$('#importanciaEdit').val(event.impor);
$('#descricaoEventoEdit').val(event.text);
$('#modalEvento').modal();
},
Modal:
<div class="row">
<div class="col-md-6">
<label for="inicio">Data</label>
</div>
<div class="col-md-6">
<label for="importancia">Prioridade</label>
</div>
<div class="form-group col-md-6">
<div class="input-group date">
<input type="text" class="form-control date" id="inicioEdit" name="data" />
<div class="input-group-addon">
<span class="glyphicon glyphicon-th"></span>
</div>
</div>
</div>
I would like a help to be able to put this date returned in the format 'yyyy-mm-dd'
Possible duplicate of How to format date in javascript?
– Woss