-
Notifications
You must be signed in to change notification settings - Fork 373
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
Angular date picker: selected date is off by one day #2033
Comments
Possible cause: Maybe some time zone shenanigans are interfering here. For example it could be that we set the time to 00:00 of the selected day, but because of some automatic timezone consideration the day is then calculated to the day before. |
I think you’re right. If I change my time zone to UTC, the date is correct. |
TheMicDiet
added a commit
to TheMicDiet/jsonforms
that referenced
this issue
Oct 14, 2022
replace toISOString() with Angular date pipe to format dates according to the local time zone instead of utc
TheMicDiet
added a commit
to TheMicDiet/jsonforms
that referenced
this issue
Oct 15, 2022
replace toISOString(), which formats dates based on the UTC time zone with Angular DatePipe, which works with local time zones
LukasBoll
pushed a commit
to LukasBoll/jsonforms
that referenced
this issue
Feb 12, 2024
replace toISOString(), which formats dates based on the UTC time zone with Angular DatePipe, which works with local time zones
Merged
LukasBoll
pushed a commit
to LukasBoll/jsonforms
that referenced
this issue
Mar 11, 2024
replace toISOString(), which formats dates based on the UTC time zone with Angular DatePipe, which works with local time zones
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When selecting a date from the date picker the date form field value is set to one day before the selected date. For example, choosing 9.10.2022 from the picker will result in 8.10.2022 being displayed in the date form field.
Expected behavior
The correct date value should be set, i.e., the date set and displayed in the date form field should match the selected date from the picker.
Steps to reproduce the issue
Screenshots
No response
In which browser are you experiencing the issue?
Google Chrome 106.0.5249.103
Framework
Angular
RendererSet
Material
Additional context
This issue occurs both in my own app and on the JSONForms Angular Material Playground (https://jsonforms-angular-seed.netlify.app/).
The text was updated successfully, but these errors were encountered: