Skip to content
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

Moment.js issues #218

Open
anchpop opened this issue May 10, 2017 · 4 comments
Open

Moment.js issues #218

anchpop opened this issue May 10, 2017 · 4 comments

Comments

@anchpop
Copy link

anchpop commented May 10, 2017

Hi, I'm using moment.js

When putting the moment object (returned by moment()) in a Immutable datastructure, it gets broken and essential features like .format() mysteriously quit working. Confusingly, the function moment.isMoment() still returns true, despite not being able to use it like a moment object at all.

I believe this is related to #25 . Any thoughts on getting moment objects classified like react objects and dates, so they won't have their prototypes stripped (which is what I believe is happening)?

@pedrogarciyalopez
Copy link

same problem

@rkkautsar
Copy link

rkkautsar commented Jul 19, 2018

🆙

EDIT:
Solved by serializing and deserializing (with format and parse)

@andykais
Copy link

as an alternative to momentjs, there is luxon, which is an immutable, date time library that is somewhat of a subset of momentjs. It is still part of the momentjs family of libraries however

@jkeam
Copy link

jkeam commented Jan 29, 2019

Similar to @rkkautsar my work around involved NOT storing moment objects but instead storing strings. It's a bit of a pain to convert them back and forth using format and parse and would love to see this implemented.

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

5 participants