Its now working for me
<input type="date" id="tdate" ng-model="to_date" ng-change="GetCustomers(1)">
<input type="date" ng-model="from_date" ng-change="GetCustomers(1)">
<script type="text/javascript">
var app = angular.module('MyApp', ['angularUtils.directives.dirPagination']);
app.controller('MyController', function ($scope, $http) {
$scope.Customers = [];
$scope.PageIndex = 1;
$scope.RecordCount = 0;
$scope.PageSize = 20;
$scope.SearchTerm = "";
$scope.GetCustomers = function (index) {
$scope.Customers = [];
$http.post("StockLedgerwithAngular.aspx/GetCustomers",
{
PageNo: index,
PageSize: $scope.PageSize,
searchTerm: $scope.SearchTerm,
selectedItem: $scope.selectedItem,
searchcat: $scope.searchcat,
to_date: Date.parse($scope.to_date),
from_date: Date.parse($scope.from_date)
},
{ headers: { 'Content-Type': 'application/json'} })
.success(function (response) {
$scope.Customers = response.d.Customers;
$scope.RecordCount = response.d.TotalRecords;
});
}
$scope.GetCustomers($scope.PageIndex);
});
</script>
<System.Web.Services.WebMethod()> _
Public Shared Function GetCustomers(ByVal PageNo As Integer, ByVal PageSize As Integer, ByVal searchTerm As String, ByVal selectedItem As String, ByVal searchcat As String, ByVal to_date As String, ByVal from_date As String) As CustomerData
End Function