I am unable to find the input field values using Angular.js. I am providing my code below:
<div class="input-group bmargindiv1 col-md-12">
<span class="input-group-addon ndrftextwidth text-right" style="width:180px">From Time :</span>
<input type="text" name="time" id="time" class="form-control oditek-form" placeholder="E.G-9.00AM-10.00AM" ng-model="time" ng-keypress="clearField('time');" maxlength="30">
</div>
<div class="input-group bmargindiv1 col-md-12">
<span class="input-group-addon ndrftextwidth text-right" style="width:180px">To Time :</span>
<input type="text" name="time1" id="time1" class="form-control oditek-form" placeholder="E.G-9.00AM-10.00AM" ng-model="time1" ng-keypress="clearField('time1');" maxlength="30">
</div>
Here I am integrating the jquery-timepicker
and the script is given below.
$(function() {
$('#time').timepicker();
$('#time1').timepicker();
});
My problem is, after selecting the time value when I am trying to fetch those value using one ng-click
event, it's showing undefined.
$scope.addTimeDetails = function() {
console.log('times', $scope.time, $scope.time1);
}