Hi,
I have 2 fields Date and Duration
currently my requirement is that if the sum of duration on that particular date exceed more than 9 hrs need to dispaly alert message else dispaly success alert message
ex:
Date Duration
1/1/2019 9
1/1/2019 2
in this instance display valid message
could you please help me
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.5/angular.js"></script>
<script type="text/javascript">
var app = angular.module('MyApp', [])
app.controller('MyController', function ($scope, $http, $window) {
$scope.Details = [{ Name: 'mahesh' }, { Name: 'mukesh'}];
$scope.Save = function () {
}
});
</script>
</head>
<body ng-app="MyApp" ng-controller="MyController">
<table id="tblOrders" class="table table-responsive">
<tr>
<th>Date</th>
<th>Name</th>
<th>Duration</th>
</tr>
<tbody ng-repeat="detail in Details">
<tr>
<td><input type="date" ng-model="detail.Date" /></td>
<td>
<input type="text" ng-model="detail.Duration" ng-change="GetMaxLength(detail,$index)" />
</td>
</tr>
</tbody>
</table>
<br />
<button ng-click="Save()">Save</button>
</body>
</html>