Im new to angular and while doing a small exercise, i was struck and I wanted to enable the ng-show depending upon previous row timings and time input is through jquery timepicker, but my angular is unable to read the value of timepicker to show next row
My code is shown below
<table class="table table-bordered">
<thead>
<tr>
<th>Time From</th>
<th>Time To</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<input type="text" ng-model="row1" size=6/ disabled>
</td>
<td>
<input type="text" id="timepicker1" ng-model="dup_row1 " size=6/>
</td>
</tr>
<tr ng-show="show_row2()">
<td>
<input type="text" ng-model="dup_row1" size=6/>
</td>
<td>
<input type="text" ng-model="dup_row2" size=6/>
</td>
</tr>
</tbody>
</table>
and my script code
var app = angular.module('myApp', []);
app.controller('ctrl', function($scope) {
$scope.row1 = "00:00"
$scope.show_row2 = function() {
if (($scope.dup_row1 && $scope.dup_row1.substring(0, 2) < 24)) {
return true
}
}
$('#timepicker1').timepicki();
Any help would be appreciated. Thanks in advance