Add locale support for month name
See original GitHub issueAre you submitting a bug report or a feature request?
Feature request
What is the current behavior?
Month names are english only and there is no way to change it since it’s using formatDate
function from date-fns
, which defaults to en-US if no locale is specified.
What is the expected behavior?
Should be able to pass a locale
prop to the component and get months names according to it.
What’s your environment?
simple-react-calendar 1.9.4
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Get localized month name using native JS - Stack Overflow
var objDate = new Date("10/11/2009"), locale = "en-us", month = objDate.toLocaleString(locale, { month: "long" });. But this only gets the month ...
Read more >Getting localized month and day names in the browser
Here's a tip — you can use it to generate localized month and day names without the need for a language pack! This...
Read more >How to insert the full month name into the subject line of an e ...
To show the full month name for the locale the service is using, change the Date format string under System Information from MM/DD/YYYY...
Read more >1.16 MySQL Server Locale Support - MySQL :: Developer Zone
The locale indicated by the lc_time_names system variable controls the language used to display day and month names and abbreviations.
Read more >Month names according to the language settings, not locale.
Month names according to the language settings, not locale. My charts are in English and I want the months displayed in English as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok! I have not use date-fns that much, but I will go for the dynamic import solution and open a PR.
this is a great idea what I was looking for but currently the PR is still open. otherwise I need to overwrite via
MonthHeaderComponent
props and copy-paste from themonth_header.tsx
andheader_button.tsx
also the PR codedon’t forget to import module from date-fns.
workaround: