Within my view, I have the following:
<tr dir-paginate="post in posts |orderBy:propertyName:reverse | filter: searchPost | itemsPerPage: pageSize">
<td>
{{post.title}}
</td>
<td>
{{post.content}}
</td>
<td>
{{post.dateOfCreation | date:"medium"}}
</td>
</tr>
Furthermore, I have implemented filtering across all fields:
<div>
<input type="text" placeholder="Find by title..." ng-model="searchPost.title" />
<div>
<div>
<input type="text" placeholder="Find by content..." ng-model="searchPost.content" />
</div>
<div>
<input type="text" placeholder="Find by date..." ng-model="searchPost.dateOfCreation" />
</div>
However, the date only filters correctly when entered in the format: yyyy-mm-dd in the textbox; limited to a single date. I aim to allow users to select date ranges and display these values, yet I struggle to integrate this functionality with my existing searchPost filter... I am utilizing angular-datepicker:
<input date-range-picker class="form-control date-picker" type="text" ng-model="someDate" options = "{locale: {format: 'YYYY-MM-DD'}}"/>
$scope.someDate = { startDate: null, endDate: null };
The datepicker library in use is: Angular Daterangepicker