const locales = {
'zh-TW': require('date-fns/locale/zh-TW'),
}
my package.json
"date-fns": "^2.15.0",
"react-big-calendar": "^0.26.0",
"typescript": "~3.7.2"
It always show en-US in calendar. It that bug?
I have this same problem
@pig800509 You should pass culture={"zh-TW"} as a prop to <Calendar/>
@pig800509 You should pass
culture={"zh-TW"}as a prop to<Calendar/>
Does not work, it causes: Uncaught RangeError: locale must contain localize property
"react-big-calendar": "^0.28.0",
"date-fns": "^2.16.1",
Try importing the locale object via namespace import
import { zhTW } from 'date-fns/locale'
and then using it like this:
const locales = {
'zh-TW': zhTW
}
Try importing the locale object via namespace import
It works now: https://codesandbox.io/s/fast-breeze-ckmf4
Most helpful comment
Does not work, it causes:
Uncaught RangeError: locale must contain localize propertyhttps://codesandbox.io/s/gifted-driscoll-ye7rn