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

Reduce moment dependency by using native Date objects (breaking change) #27

Closed
gpbl opened this issue May 31, 2015 · 0 comments
Closed

Comments

@gpbl
Copy link
Owner

gpbl commented May 31, 2015

My plan to move away from moment.js didn't work, basically because I couldn't find any valid alternative for supporting multiple locales (see #2). I'd like, at least, to reduce the use of moment.js by doing the following:

  • Rewrite CalendarUtils to work with javascript's Date. A well written utility doing similar things is this one from material-ui. This choice implies that the day picker will accept and return only Date objects.
  • Move momentjs-related functions into an external util, so it will be easy to replace it as I find a better solution for replacing moment.js. Developers could provide their own utility using webpack's NormalModuleReplacementPlugin. Those functions are just to format dates to strings and to know the first day of the week.
@gpbl gpbl added this to the v1.0.0 milestone May 31, 2015
@gpbl gpbl changed the title Reduce moment dependency by using native Date objects Reduce moment dependency by using native Date objects (breaking change) May 31, 2015
gpbl added a commit that referenced this issue Jun 6, 2015
With this rewrite, utils use the native Date objects. Component is more testable and uses div's instead of table elements
@gpbl gpbl closed this as completed Jun 24, 2015
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

1 participant