I have some JSON I pull into my Angular application. I use ng-repeat to output the JSON to the page, but I would now like to filter on a date field. I can filter on the necessary field using the ng-model query. However the data that comes from the server is converted to the specific date format in a filter in the repeater itself. Therefore using the filter box does not work as expected. I am uncertain at this point how I would convert what's entered into the ng-model text box into the required format.
Enter the time you left: <input ng-model="query.start">
<ul>
<li ng-repeat="incident in Traffic | filter: query">
<h3>{{incident.description}}</h3>
<p>Start: {{incident.start | jsonDate : 'yyyy-MM-dd HH:mm'}}</p>
<p>End: {{incident.end| jsonDate : 'yyyy-MM-dd HH:mm'}}</p>
</li>
</ul>