user2727195
user2727195

Reputation: 7330

How to apply date filter to ng-select ng-repeat?

I've a nested repeat list as follows and I'm wondering how to apply 06-27-15 (mm-dd-yy) date format to values.

<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>

Upvotes: 0

Views: 1042

Answers (2)

user3227295
user3227295

Reputation: 2156

    <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

Upvotes: 1

eladcon
eladcon

Reputation: 5825

Try something like this:

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

Upvotes: 1

Related Questions