Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

I can't use filters with ng-change directive #290

Open
csimpi opened this issue May 10, 2017 · 0 comments
Open

I can't use filters with ng-change directive #290

csimpi opened this issue May 10, 2017 · 0 comments

Comments

@csimpi
Copy link

csimpi commented May 10, 2017

I have a datepicker for user select his/hers birthday. I would like to put the age to the next field.
I'm using this attribute, but it puts the selected date with original date format without filters:

ng-change="candidateAge=formData.birthday|amParse:JS_DATE_FORMAT|amDateFormat:'MM.DD.YYYY HH:mm:ss'"

Input: 05/13/2017
Output: 05/13/2017

JS_DATE_FORMAT is defined, I've checked.

If i would print the excepted value it works fine:
{[{formData.birthday|amParse:JS_DATE_FORMAT|amDateFormat:'MM.DD.YYYY'}]}

Input: 05/13/2017
Output: 05.10.2017

So why angular-moment filters doesn't work with ng-change?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant