Skip to content

Firefox reporting NaN for dates #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mlabieniec opened this issue Apr 17, 2015 · 4 comments
Closed

Firefox reporting NaN for dates #32

mlabieniec opened this issue Apr 17, 2015 · 4 comments

Comments

@mlabieniec
Copy link

Hello, seems in firefox I'm getting NaN for dates.
selection_084

@mlabieniec
Copy link
Author

Well, it works if I use {{dateObj | date:'medium'}}

@yaru22
Copy link
Owner

yaru22 commented May 22, 2015

Could you try with the latest version and see if the problem persists?

@yaru22
Copy link
Owner

yaru22 commented Aug 18, 2015

Closing due to inactivity. Please re-open if this problem persists.

@yaru22 yaru22 closed this as completed Aug 18, 2015
@JobaDiniz
Copy link

This happens because of how interpolation works: angular/angular.js#14027
{{date}} will return a string, that is, a text with quotes, like: "June 1st"

When setting the from-time parameter through interpolation: <time-ago from-time="{{vm.date}}" /> the produced html will be <time-ago from-time=""June 1st"" />. Did you noticed? There is a duplicate double-quotes there.

Chrome interprets this just fine, but IE and Firefox do not.
As a workaround I used @mlabieniec snippet {{dateObj | date:'medium'}}

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

No branches or pull requests

3 participants