Closed dylantf closed 1 month ago
Can you provide a reproduction sandbox?
Sure, here's a sandbox: https://codesandbox.io/p/sandbox/mantine-react-template-forked-pm3mxg
You may need to adjust the timezone based on where you are to see the problem.
I'm experiencing the same or similar issue trying to use UTC with the DatePickerInput component (I am located in eastern TZ). Codesandbox.
Dependencies check up
What version of @mantine/* packages do you have in package.json?
7.12.2
What package has an issue?
@mantine/dates
What framework do you use?
Remix
In which browsers you can reproduce the issue?
Chrome
Describe the bug
When setting a timezone through DatesProvider, it appears that the internal conversion is done correctly on the underlying Date object for the input's value. However, when inspecting the hidden input, there is a further conversion being done based on the browser's timezone, which results in the value being incorrect when submitting a plain HTML form.
Example:
2024-09-17T21:00:00.634Z
)2024-09-17T19:00:00.634Z
(2 hours off)If possible, include a link to a codesandbox with a minimal reproduction
No response
Possible fix
No response
Self-service