Closed kyleabens closed 4 years ago
Just noticed #4 and after installing 1.0.0-alpha1 the error has been resolved but now there are no labels being displayed on the x axis. No errors are logged so I'm not sure why.
Nevermind that was an issue on my end and I was also able to add a custom webpack config file so I could remove moment from the bundle.
For anyone coming here for the same issue, I "fixed" this "properly" by creating a copy of index.js
into my project.
parse
is now parseISO
just rename that.
If you're using ts, you'll need to @ts-ignore
the import statement of _adapters
, and add explicit any
to all variables.
Then all Y
and D
date format strings have to be lower cased, to match the unicode specification.
https://gist.github.com/darylteo/083e926336f6a0eda589618ddc814f79
@darylteo, renaming parse
to parseISO
during imports works for me.
I was using parse with the date-fns
library so the issue above came up.
Thanks
I use chart.js and just found out that I can also use date-fns with it by installing this adapter. I install it and imported it as instructed...
But now I receive the following error:
I use date-fns 2.4.1. This could be an issue since there were some breaking changes when upgrading to v2 and this error seems to be a result of the new parse function that I guess requires a 3rd argument https://date-fns.org/v2.4.1/docs/parse
With that being said I suppose this is more a feature request to upgrade the adapter to handle date-fns v2