-
Notifications
You must be signed in to change notification settings - Fork 405
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
locale not apply #220
Comments
<InfiniteCalendar But month lable still use English language ? |
Did you install date-fns ? |
@HongAnhDo have you solved your problem ? Facing same issue |
Ok found the problem : version package of I installed |
Still same in |
I'm using Typescript with React and I tried datePicker.tsx import ko from "date-fns/locale/ko";
//...
<InfiniteCalendar
locale={{
locale: ko,
headerFormat: "YYYY MM DD",
weekdays: ["월", "화", "수", "목", "금", "토", "일"],
blank: "날짜를 선택하세요.",
todayLabel: {
long: "오늘"
}
}}
/> index.d.ts locale?: {
+ locale?: any;
blank?: string;
headerFormat?: string;
todayLabel?: {
long: string;
};
weekdays?: string[];
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
}; It works, I think it is due to index.d.ts |
Is there a fix to this issue yet? |
Ah this worked for me too. Thank you! |
I work too ! |
Hello! Hopefully someone can provide some assistance, as I seem to be running into the same issue. I am using the calendar in an app where the user can swap between German and English. My locale constant is set up like this:
Everything works well in both languages, except for the month names, which always appear in English. I saw the note about the date-fns version, but unfortunately other parts of the app require date-fns ^2.16. So, I have tried adding a yarn resolution to my package.json, which looks like this:
Unfortunately, that did not solve the issue. Does anyone have another work-around, or any advice on how to fix the dependency version issue? Thank you! |
For anyone else looking for a solution, I was able to figure out one for me. Largely my code posted above works, but instead of a resolution, I simply require the date-fns version from inside the react-infinite-calendar node_module, instead of the date-fns one like above. So my 4th line of code (as posted here) now reads: Hope this helps! |
Seems fixed issue latest version |
No description provided.
The text was updated successfully, but these errors were encountered: