Skip to content
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

Crdcdh 586 #207

Merged
merged 6 commits into from
Nov 9, 2023
Merged

Crdcdh 586 #207

merged 6 commits into from
Nov 9, 2023

Conversation

mtangmt
Copy link
Contributor

@mtangmt mtangmt commented Nov 9, 2023

Overview

This PR addresses the bug in ticket 586 where the date picker would incorrectly show the error border on the current date.

Change Details (Specifics)

This bug was caused by the date picker returning the incorrect midnight for the day due to daylight savings.
To fix this, I just applied a time zone to the value returned by the date picker, and now it should work.
To test this, I changed the time zone for both node, and the browser following these steps: https://www.browserstack.com/guide/change-time-zone-in-chrome-for-testing.
If you console.log the value in the onChange function prop to to StyledDatePicker, you can see that the value depends on the browser time zone.
This leads me to believe the MUI date picker uses the browser's time zone, so by normalizing the time zone in the code, I believe this issue is fixed.

Related tickets

https://tracker.nci.nih.gov/browse/CRDCDH-586

@mtangmt mtangmt added this to the MVP-2.0.0 (M2) milestone Nov 9, 2023
@mtangmt mtangmt changed the base branch from main to mvp-2 November 9, 2023 16:57
Copy link
Member

@amattu2 amattu2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Waiting on @Alejandro-Vega's review then we can merge.

Copy link
Collaborator

@Alejandro-Vega Alejandro-Vega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Alejandro-Vega Alejandro-Vega merged commit 999eb10 into mvp-2 Nov 9, 2023
1 check passed
@Alejandro-Vega Alejandro-Vega deleted the CRDCDH-586 branch November 9, 2023 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants