A
A
Alexander Kovalchuk2015-08-06 15:33:39
Angular
Alexander Kovalchuk, 2015-08-06 15:33:39

How to put date filter on ng-model?

What is now:

<div>
  <label>Дата </label>
  <input type = "date"
  ng-model = "user.date">
</div>

user creates this JSON
{
    "date":"2015-08-14T21:00:00.000Z"
}

and you need to filter like this:
{
    "date":"2015-08-14"
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2015-08-06
@maxloyko

{{ date | date: 'yyyy-MM-dd'}}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question