question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with not supported browser locale

See original GitHub issue

If I set my browser language to some unsupported datepicker language e.g. Italian it will throw an error: `RangeError: Maximum call stack size exceeded You can reproduce this bug even on demo page: https://vue-datepicker.netlify.app/, just set you browser language to some unsupported one. Here is screenshot of the error: image

Also, workaround to set locale to :locale=“{lang: ‘en’}” does not work for me as then date picker does not show dates: image

Any other way I can force default locale to en?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:7
  • Comments:6

github_iconTop GitHub Comments

2reactions
VirajSingh19commented, Apr 7, 2021

In my case the workaround works if I regiser the component globally and pass { lang: ‘en’ } options


import VueDatePicker from '@mathieustan/vue-datepicker';
Vue.use(VueDatePicker, { lang: 'en' });
1reaction
marisprocommented, May 3, 2021

Solved this issue by downgrade to “0.2.4”

Read more comments on GitHub >

github_iconTop Results From Across the Web

IT11799: WEB UI IS BROKEN WHEN BROWSER LOCALE IS ...
If you set your browser locale to any unsupported language, the web UI fails to render and there is only a blank page,...
Read more >
The language you've chosen is not supported in this database.
Login Error – The language you've chosen is not supported in this database. You need to change your browser language to English (US)....
Read more >
JavaScript for detecting browser language preference [duplicate]
I think the main problem here is that the browser settings don't actually affect the navigator.language property that is obtained via javascript.
Read more >
Setting language preferences in a browser - W3C
Sometimes a server may determine which language to send to you in a way that doesn't rely on the Accept-Language information.
Read more >
Navigator.language - Web APIs | MDN
language read-only property returns a string representing the preferred language of the user, usually the language of the browser UI. Value. A ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found