This is my Select and options should be in yyyy/MM/dd but they aren't
<select ng-model="date" ng-options="row.Triage_x0020_start_x0020_date as row.Triage_x0020_start_x0020_date for row in rows | jsonDate:'yyyy/MM/dd'| unique:'Triage_x0020_start_x0020_date'">
-- choose Topic --
This is my list which is displaying correctly row.Triage_x0020_start_x0020_date
<ul>
<li ng-repeat="row in rows | filter:businessUnit | filter:topic | filter:date">
<p>{{row.ID}}</p>
<p>{{row.BusinessUnit}}</p>
<p>{{row.Topic}}</p>
<p>{{row.Triage_x0020_start_x0020_date | jsonDate:'yyyy/MM/dd'}}</p>
</li>
</ul>
This is my list which is filter which converting json string to Date object.
var myApp = angular.module('myApp', ['ngRoute','ui.utils']);
myApp.filter('jsonDate', function ($filter) {
return function (input, format) {
return $filter('date')(new Date(input), format);
};
});
myApp.controller('RowsListCtrl', function ($scope) {
$scope.rows = myJSON;
});
Question is why filter doesn't work in select > options and displaying string 2014-04-02 18:00:00