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

Set day of week to start #3812

Closed
vendramini opened this issue May 16, 2024 · 4 comments
Closed

Set day of week to start #3812

vendramini opened this issue May 16, 2024 · 4 comments

Comments

@vendramini
Copy link

vendramini commented May 16, 2024

What problem does this feature solve?

Set which day of week should be the first one. Our customers need to set which day of week their business start calculating to pay their employees. Example: my business work from Tuesday to Tuesday. It's a very specific use-case but it does exist. Currently we are using dayjs + @mui/x-date-pickers/DateCalendar which works well, but I would like to change to rsuite - for other reasons.

As @mui/x-date-pickers/DateCalendar works with dayjs, I just have to do this dayjs.updateLocale('en', { weekStart: 2 }); and it changes the calendar's starting week.

What does the proposed API look like?

weekStart={0 | 1 | 2 | 3 | 4 | 5 | 6} maybe on <CustomProvider/>?

@simonguo
Copy link
Member

Hi @vendramini
Can you provide an example that I can refer to? For example, a demo on codesandbox.

@vendramini
Copy link
Author

Hey @simonguo
https://codesandbox.io/p/sandbox/set-week-start-75hj2y just change weekStart value.

Thanks :)

@simonguo
Copy link
Member

Support weekStart in v5.62.0.

https://rsuitejs.com/components/calendar/#custom-week

@vendramini
Copy link
Author

Thank you so much <3

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

2 participants