Open csimpi opened 7 years ago
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'"
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.
JS_DATE_FORMAT
If i would print the excepted value it works fine: {[{formData.birthday|amParse:JS_DATE_FORMAT|amDateFormat:'MM.DD.YYYY'}]}
{[{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?
ng-change
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'
"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'}]}
So why angular-moment filters doesn't work with
ng-change
?