-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[bug]: Calendar widget adds a date prior to the selected date #3305
Comments
I believe I've found the error. The method, "renderShortDate()", accepts a date string with this format: "2024-01-17". This value is cast into a Date object, but it does not include a time. The lack of a time value creates a problem here; the Date object appears to use the user's local timezone. So, when using "Date.getDate()" to return the day value of the date string, the timezone ends up displaying the wrong day value. This code snippet demonstrates the problem; I believe the resolution is to use Date.getUTCDate().
For what it's worth, the value in the database is correct -- the renderer is simply showing the wrong value. |
I got this same error, it is caused here because I'm in a negative timezone (gmt -3) so when it renders displays the wrong date. If I switch pc hour to a positive timezone, the bug disappear. It might be required a normalization of the date object before renders it on the screen. |
I can confirm this bug is still present on v0.15.0 |
@Marinofull I can as well, hoping this well be fixed in the next release! |
I can confirm this bug is still present on v0.16.0. |
This issue is resolved in PR #3992 |
Is there an existing issue for this?
Current behavior
When editing an issue, if you select a value for either Start Date or End Date, the value is the day prior to the selected date (i.e., I select "January 5, 2024", but January 4, 2024" is displayed instead).
Screen.Recording.2024-01-02.at.3.54.47.PM.mov
Steps to reproduce
See the screen-recording above.
This issue exists in Firefox 121 and Chromium 120.0.6099.144
Browser
Mozilla Firefox
Version
Self-hosted
The text was updated successfully, but these errors were encountered: