如何将日期过滤器应用于ng-select ng-repeat?

时间:2015-05-21 08:20:05

标签: angularjs

我有一个嵌套的重复列表,如下所示,我想知道如何将06-27-15(mm-dd-yy)日期格式应用于值。

<select ng-model="data.dayId" ng-value="day.id" ng-options="day.id as day.date group by day.name for day in days" required>

</select>

2 个答案:

答案 0 :(得分:1)

尝试这样的事情:

ng-options="day.id as (day.date | date:'mm-dd-yy') group by day.name for day in days"

答案 1 :(得分:1)

    <select ng-model="data.dayId" ng-value="day.id" ng-options="day.id as (day.date |date:'mm-dd-yy')group by day.name for day in days" required>

</select>

from here