0
I have a form with the option to choose date and Time. I’m using the Datepicker and Timepicker components.
<!-- Date -->
<div class="col-xs-12 col-md-3 col-lg-3">
<div class="form-group">
<label>Data</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input ng-model="alerta.data" type="text" class="form-control pull-right" id="dataHora">
</div>
</div>
</div>
<!-- Time -->
<div class="col-xs-12 col-md-3 col-lg-3">
<div class="form-group">
<label>Hora</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-clock-o"></i>
</div>
<input ng-model="alerta.hora" type="text" class="form-control pull-right" id="timePicker">
</div>
</div>
</div>
The problem I’m having is this, when I send the form, I’m not receiving the alert.time and alert.data values in my controller. The rest of the form inputs normally receive.
Follow JSON of return:
This is the function that starts the two components:
vm.dateTimeRange = function() {
$('#dataHora').datepicker({timePicker: true, timePickerIncrement: 30, format: 'dd/mm/yyyy'});
$('#timePicker').timepicker();
}