<table id="transactionsList" ng-show="invoiceTransactionsObject.transactions.length>0" class="table table-bordered table-hover table-list"> <thead> <tr> <td>Trans No</td> <td>@Labels.quantity</td> <td>@Labels.message</td> <td>@Labels.item</td> <td>@Labels.amount</td> <td>@Labels.CreatedBy</td> <td>@Labels.CreatedOn</td> </tr> </thead> <tbody> <tr ng-repeat="trans in invoiceTransactionsObject.transactions | filter:searchTerm"> <td>{{trans.transNo}}</td> <td>{{trans.quantity}}</td> <td>{{trans.message}}</td> <td>{{trans.item}}</td> <td><span ng-class="{'negative-amount' : trans.extension < 0}">{{trans.extension | currency}}</span></td> <td>{{trans.operator}}</td> <td>{{trans.dateTime | date: 'MM-dd-yyyy'}}</td> </tr> </tbody>Note the filter in ng-repeat directive. The problem is that I also have 2 date controls on that form
<div class="row"> <div class="col-md-4 col-md-offset-1"> <data-sm:date-time-picker ng-model="startDate" pick-time="true" is-date-range="true" form="form" data-no:dirty-check="true" compare-date="endDate" name="startDate"></data-sm:date-time-picker> </div> <div class="col-md-4 col-md-offset-0"> <data-sm:date-time-picker ng-model="endDate" pick-time="true" is-date-range="true" form="form" compare-date="startDate" data-no:dirty-check="true" is-end-date="true" name="endDate"></data-sm:date-time-picker> </div> <button class="col-md-3 btn" ng-click="filterByDate()">@Labels.filter</button> </div>So, if these dates (or one of them) are populated, I want to also apply the dates filter. I found http://stackoverflow.com/questions/25515431/ng-repeat-filtering-data-by-date-range so I plan to create a custom dateRange filter (need to somehow make it more generic to allow to pass date column name), but I am wondering how can I combine 2 filters?