-
-
Notifications
You must be signed in to change notification settings - Fork 634
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
First day of the week at date picker for date/time field #1152
Comments
Teable assumes that if you have selected English language, you are interested in en-US variant of calendar. If we changed defaults to en-GB, it would start week from Monday: https://github.com/date-fns/date-fns/blob/6c70ac6d073ebe869e42795f5e71dfecf5abbea0/src/locale/en-GB/index.ts#L15-L26 Implementing this feature request would be straightforward, as there is an option in the upstream to overwrite locale's default behavior: https://daypicker.dev/docs/localization#first-date-of-the-week It's very simple, you have to add teable/packages/sdk/src/components/editor/date/EditorMain.tsx Lines 107 to 108 in 5afcd26
and user setting there: |
Sounds right, so in my case i should have ru-RU locale, but datepicker in cell still starts from sunday and not translated to russian. |
I've added PR that fixes that issue. Waiting for project owner's decision whether they want to have an additional field in the user settings under ‘language’ to select the user's preferred first day of the month. |
Is your feature request related to a problem? Please describe.
In date picker for date/time field first day of the week is sunday. It is wery confusing on some cultures.
Roughly 44% of world populations starts week from monday
Describe the solution you'd like
Give option for users to select first day of the week.
Default value may be from teable instance settings or from browser locale and ability to overwrite it for user in profile settings.
This way every member of multy-culture team will have preferred options and better defaults
Describe alternatives you've considered
Default first week day in date picker just from browser locale
Additional context
Calendar view properly localized and starts from monday on RU locale. So maybe it is just an localization bug.
The text was updated successfully, but these errors were encountered: