[Demo Site] A locale object was not found for the provided string ["en-GB"].
See original GitHub issueDescribe the bug The locale example on the demo site is not working correctly. It is using my locale (en-US) instead of the stated locale (en-GB). It is also produces an error. Error reproduced below
To Reproduce Steps to reproduce the behavior:
- Go to ‘https://reactdatepicker.com/#example-locale’
- Open Dev Tools, (I am using chrome in this instance. However issue is also present in FireFox)
- Click on the date field
- View console.
Scroll up or down to reproduce the.
See error in Additional Context
Expected behavior Expected date popup with correct local (en-GB in this instance).
Screenshots
Desktop (please complete the following information):
- OS: Windows
- Browser Chrome, Firefox
- Version 76.0.3809.100, 68.0.2 respectivly
Additional context Error procuced from console
backend.js:6 A locale object was not found for the provided string ["en-GB"].
r @ backend.js:6
we @ index.js:403
(anonymous) @ index.js:552
(anonymous) @ index.js:2459
(anonymous) @ index.js:2445
(anonymous) @ index.js:2442
(anonymous) @ index.js:2654
(anonymous) @ index.js:2708
value @ index.js:2836
yi @ react-dom.production.min.js:3880
mi @ react-dom.production.min.js:3871
Jo @ react-dom.production.min.js:6116
Wo @ react-dom.production.min.js:5101
Ho @ react-dom.production.min.js:4958
Fo @ react-dom.production.min.js:4817
(anonymous) @ react-dom.production.min.js:2543
a.unstable_runWithPriority @ scheduler.production.min.js:338
cr @ react-dom.production.min.js:2513
Rr @ react-dom.production.min.js:2538
hr @ react-dom.production.min.js:2528
Ie @ react-dom.production.min.js:6706
Bn @ react-dom.production.min.js:1817
Ln @ react-dom.production.min.js:1790
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
How to use the react-datepicker.registerLocale function in ...
To help you get started, we've selected a few react-datepicker.registerLocale examples, based on popular ways it is used in public projects.
Read more >Creating a Locale (The Java™ Tutorials > Internationalization ...
This internationalization Java tutorial describes setting locale, isolating locale-specific data, formatting data, internationalized domain name and ...
Read more >Change locale in react-datepicker - Stack Overflow
First of all make sure you are using the latest version of the plugin (2.0.0). Then you need to also install the date-fns...
Read more >Globalization and localization in ASP.NET Core
A multilingual website allows the site to reach a wider audience. ASP. ... RootNamespace is a build-time value which is not available to...
Read more >Supported Locales and Fallback Chain - SAPUI5 SDK
Available properties files for a resource bundle and the locales you specify ... tag or a JDK-compatible locale string (e.g. "en-GB" , "en_GB"...
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 Free
Top 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
This isnt fixed, even on your demo site with “en-GB” your input is still “en-US”. i also get this console warning with “en-US” as locale.
From his commit on issue #1872 I checked he did 2 things:
So, in order to make it work in my code, I did the following: