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.

Datepicker - Language support

See original GitHub issue

Issue type

I’m submitting a …

  • bug report
  • feature request

Issue description

Current behavior:

  1. The calendar’s language it’s only in english;
  2. When I select the data range, the input show that “Feb 6, 2019 - Feb 9, 2019”;

Expected behavior:

  1. The calendar’s language in many languages;
  2. I want to show that in input “06/02/2019 - 09/02/2019” or “06 de fevereiro de 2019 - 09 de fevereiro de 2019” (Brazilian language);

Other information:

npm, node, OS, Browser

Node, npm: v9.11.1 and 5.6.0
OS: Windows 8.1
Browser: Chrome

Angular, Nebular

Angular: 7.2.3
Nebular: 3.0.0

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
p-spacekcommented, Mar 28, 2019

Hi It still doesn’t work properly unfortunately. The are 2 problems:

  1. if you check formControl errors, there’s invalid date if format is little bit different from english for example: czech date format (cs-CZ) is ‘D. M. YYYY’ if you choose 28.3.2019 from picker correct string is inserted into input. But there will be validation error on formControl.

  2. if you change date directly in the input, locale format isn’t used ex: 28.3.2019 -> 29.3.2019

tryit: https://stackblitz.com/edit/localeid-datepicker-localization-2

2reactions
ygggcommented, Feb 14, 2019

Hi @RodrigoPauletti! Under the hood, datepicker uses angular LOCALE_ID to format date to a string. So after you provide it, the output will be localized. See example (file: app.module.ts). Details on i18n angular.

Keeping the issue open, as we need to add localization details to the docs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JQuery datepicker language - Stack Overflow
JQuery datepicker language - Stack Overflow. Stack Overflow for Teams – Start collaborating and sharing organizational knowledge.
Read more >
I18N — bootstrap-datepicker documentation - Read the Docs
I18N¶. The plugin supports i18n for the month and weekday names and the weekStart option. The default is English (“en”); other available translations...
Read more >
How to change language of jQuery UI datepicker - Makitweb -
jQuery UI datepicker by default show widget text content in English language but you can change it any other language easily.
Read more >
jQuery UI Datepicker - Localize calendar
The datepicker includes built-in support for languages that read right-to-left, such as Arabic and Hebrew.
Read more >
Datepicker Widget - jQuery UI API Documentation
Datepicker provides support for localizing its content to cater for different languages and date formats. Each localization is contained within its own file ......
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