-
-
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
[data grid] Date filter applying wrong date when using 'date' columns and string dates in timezones that are not UTC #6764
Comments
I noticed in the example that the generated From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date#syntax
|
Okey that does make sense, but the wierd thing is that the date filter |
Yes, but the tricky part is that we split the From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date#syntax
They appear to be in the same time zone, but when passed through Here's an example showing that if you provide a valid ISO 8601 date, then it will filter correctly according to what is seen on the screen. |
Ah okay I see. Then I will create a Thank you for time and help! |
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example: Sandbox
Steps:
Current behavior 😯
Only the date one day after the date in the filter shows up
Expected behavior 🤔
The date in the filter should match the dates in the table when using the is operator (the same behaviour is true for the other operators aswell).
Context 🔦
We are representing dates as strings in our project to avoid dealing with timezones as much as possible and have customers all around the world. Therefore the date filtering does not work for them as they are not in UTC all of the time.
Your environment 🌎
System: OS: Linux 6.0 Arch Linux Binaries: Node: 19.0.1 - /usr/bin/node Yarn: Not Found npm: 8.19.2 - /usr/bin/npm Browsers: Chrome: Not Found Firefox: Not Found npmPackages: @emotion/react: 11.10.4 @emotion/styled: 11.10.4 @mui/base: 5.0.0-alpha.93 @mui/core-downloads-tracker: 5.10.1 @mui/icons-material: 5.10.9 => 5.10.9 @mui/lab: 5.0.0-alpha.103 => 5.0.0-alpha.103 @mui/material: 5.10.1 @mui/private-theming: 5.10.9 @mui/styled-engine: 5.10.8 @mui/system: 5.10.9 @mui/types: 7.2.0 @mui/utils: 5.10.9 @mui/x-data-grid: 5.17.7 @mui/x-data-grid-pro: 5.17.7 => 5.17.7 @mui/x-date-pickers: 5.0.4 @mui/x-date-pickers-pro: 5.0.4 => 5.0.4 @mui/x-license-pro: 5.17.0 @types/react: 18.0.21 => 18.0.21 react: 18.2.0 => 18.2.0 react-dom: 18.2.0 => 18.2.0 typescript: 4.8.4 => 4.8.4npx @mui/envinfo
Chromium browser was used
Order ID 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: