Closed Redsandro closed 4 years ago
You're passing in a Date instance and not a String and momentjs warns against this because of browser inconsistencies in how Date's are handled across browsers.
This seems to be related to the browser inconsistency discussed here: https://momentjs.com/docs/#/parsing/string/
Using a
pickupDate
from my model asDS.attr('date')
, I can't usemoment-format
in Safari like so:It will show:
This issue is similar to the previously closed #187. The bug was closed by @ihomp after commenting:
However, this is a workaround, not a fix for this issue. The documentation states that the date passed to moment-format can be:
So I am passing a Date. It should work. If I pass this to
moment
in Safari manualy:It works as expected.
Why does the date get invalid in Safari after being passed through
moment-format
?