Skip to content
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

Change locale #591

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Change locale #591

wants to merge 3 commits into from

Conversation

GrimonprezAlexis
Copy link

@GrimonprezAlexis GrimonprezAlexis commented Feb 11, 2022

Is you commit solved this problem ? i trying to change the locale to 'fr-FR' the top navigation change with locale but the label in calendar still default (show picture and sandbox), do you've a idea ?

(https://stackoverflow.com/questions/71079149/change-locale-langue-react-calendar)
https://codesandbox.io/s/create-a-calendar-in-react-js-forked-j2lud?file=/src/App.js:387-491

`
import Calendar from 'react-calendar';
import 'react-calendar/dist/Calendar.css'
import dayjs from 'dayjs';

<Calendar
onChange={handleChange}
value={dateValue}
locale={"fr-FR"}
formatDay={(locale, date) =>
dayjs(date).locale("fr").format("DD-MMMM-YYYY")
}
/>
`

Capture d’écran 2022-02-11 à 11 55 34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants