-
-
Notifications
You must be signed in to change notification settings - Fork 762
Closed
Description
When I first wrote this component, moment.js was the only good library to work with Date
objects – but being its size so big I preferred to keep this package without depending on it (one of the reasons I made this component was that the available date picker were always requiring moment.js). But working with Date objects in javascript is not easy at all, and maintaining my own Dates manipulation library requires some effort.
Now we have date-fns: it is modular like lodash so I expect it that adopting it would not increase so much the size of this module. Adopting date-fns would have many benefits:
- finally fix long standing issues with timezones for some edge cases (need UTC functions date-fns/date-fns#376 closed)
- we won't need to change the date to 12AM to workaround such issues (need UTC functions date-fns/date-fns#376 closed)
- react-day-picker would have built-in support for i18n (wait for date-fns v2)
- we can remove the required moment.js support from the input component
- we would push js community away from moment.js and adopt this better date library
Similar discussion: react-dates/react-dates#208
cr101, kylealwyn, brycehill, gpbl, leshakoss and 25 morecr101, robwise, geowarin, davidspiess, koox00 and 11 morestunaz, artemruts, gcpantazis, rpellerin, pluma and 2 more
Metadata
Metadata
Assignees
Labels
No labels