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

Datepciker headers are incorrect when using locale (en) #246

Closed
JorneDelforge opened this issue Aug 5, 2021 · 1 comment · Fixed by #251
Closed

Datepciker headers are incorrect when using locale (en) #246

JorneDelforge opened this issue Aug 5, 2021 · 1 comment · Fixed by #251
Assignees
Labels
bug Something isn't working

Comments

@JorneDelforge
Copy link

Describe the bug

When using the react date picker in 'en' locale, the headers are misaligned. Sunday is first day of the week, but the calendar dates are still assuming Monday as first day of the week.

Screenshot attached.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://digipolisantwerp.github.io/antwerp-ui_react/#form ==> date picker component, make certain locale is set to 'en' in the example code
  2. Open the date picker and compare it to you system calendar. Day of week does not match the actual dates. Example: 1 august 2021 is a Sunday, not a Saturday

Screenshots

Screenshot 2021-08-04 at 12 55 30

OS (please complete the following information):

  • Device: MacBook
  • OS: OS X
  • Browser Safari & Chrome

Additional context

Has been discussed with Joeri S. When setting locale to 'nl' the issue is fixed.

@jsebrech
Copy link
Contributor

jsebrech commented Aug 5, 2021

There is an additional issue. When starting a fresh project with the Digipolis Starter kit, and including the Datepicker component on a page, locale=nl does not work. This is related to moment/moment#4216

As a workaround, one can put this code at the top of index.js:
import 'moment/locale/nl';

@jsebrech jsebrech added the bug Something isn't working label Aug 5, 2021
@jsebrech jsebrech self-assigned this Aug 6, 2021
jsebrech added a commit that referenced this issue Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants