-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[pickers][DatePicker] Weekdays are shifted when using GMT timezone (such as Europe/London) #16090
Comments
Looks also related to the following issues already reported:
Let me know if you need additional information @flaviendelangle |
Hey @jimmyh-onepilot ... as you stated correctly this is due to a bug from dayjs when using a zero offset timezone, such as duplicate of #9653 |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @jimmyh-onepilot How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Thanks for your reply @michelengelen This is unfortunate.. is there any workaround or anything to prevent this issue? |
Well, the obvious workaround is to use a different library like Unfortunately we do not have any other workaround as of now and the |
Steps to reproduce
@mui/x-date-pickers
.Current behavior
The calendar displays incorrect dates when using the
@mui/x-date-pickers
withdayjs
and setting the timezone to'Europe/London'
(or any GMT timezone).For example, January 1, 2025, is shown as a Thursday instead of a Wednesday.
I need to display the hours according to the timezone from my event. However, when selecting a date with
Europe/London
, the current month is wrong (the previous month?) and the days are incorrect.While it seems to be working as expected for any other timezone, such as Europe/Paris (GMT+1) or Europe/Riga (GMT+2).
Here's my following code:
Also tried with this one, but does not seem to resolve the issue.
Expected behavior
DateTimePicker should also work with values from the GMT timezone and must suggest current month of selected date, and not the previous one.
Also reproduced on the documentation example with
'Europe/London'
value.Context
I need to display the hours according to the timezone from my event, which is currently working. But when coming to selecting a value, it seems to have an issue with events having specific timezone. (such as
Europe/London
)Your environment
npx @mui/envinfo
Environment:
@mui/x-date-pickers
: 6.14 (Also tried with latest update 7.23.3)dayjs
: 1.11.5 (Also tried with latest update 1.11.13)Build tool
: ViteOS
: macOS VenturaSearch keywords: Picker wrong weekdays timezone
The text was updated successfully, but these errors were encountered: