Skip to content

Need to set calendar to ISO weeks but with the week starting on Sunday and week 1 containing Jan 4 #5467

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

Open
amakaa opened this issue Mar 5, 2025 · 0 comments

Comments

@amakaa
Copy link

amakaa commented Mar 5, 2025

Is your feature request related to a problem? Please describe.
I'm trying to set the calendar to ISO weeks but with the week starting on Sunday and week 1 containing Jan 4

Describe the solution you'd like
Setting the locale should be enough but it turns out that Week 1 in Jan 2026 doesn't have Jan 4

Describe alternatives you've considered
I tried formatWeeks method but it seems difficult to implement

Additional context
On material UI datepicker, setting the locale as { weekStartsOn: 0, firstWeekContainsDate: 4 } works to have Jan 4 in week 1 and OK with having a week 53 to maintain the rule:

Image

In react-datepicker it forces it to stop at week 52:

Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant