react-date-range icon indicating copy to clipboard operation
react-date-range copied to clipboard

TypeError: locale.localize.months is not a function

Open Ionut-Milas opened this issue 8 years ago • 4 comments

Subject of the issue

I am trying to add enGB locale. I simply installed the date-fns lib, and the datepicker crashes with the above error

[BUG] Bug Reproduce Steps

Tell us how to reproduce this issue. I just added "date-fns": "2.0.0-alpha.25",

[BUG] Expected behaviour

It should not crash

Environment

Package Version: "^1.0.0-beta" React version: 16.5.2 Node version: 10 Browser: Chrome

Ionut-Milas avatar Nov 16 '18 07:11 Ionut-Milas

Same problem here...

Tried to use pt-BR locale and the exact same error ocurred.

victormoraesgs avatar Nov 28 '18 20:11 victormoraesgs

For anyone still wondering, try downgraded date-fns version to 2.0.0-alpha.7. It works for me.

immortaldogg avatar Apr 01 '19 10:04 immortaldogg

@laminh711 version 2.0.0-alpha.7 does not have my locale I need faIR locale

mohsensaremi avatar Jan 04 '20 14:01 mohsensaremi

This issue is resolved in the latest release (1.1.0). Now, date-fns is loaded as a peer dependency and you can use versions between 2.0.0 and the latest. I'm closing this.

onurkerimov avatar Feb 19 '20 14:02 onurkerimov