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

fix: react datepicker workaround for local time #944

Merged
merged 3 commits into from
Apr 10, 2024

Conversation

rayzhou-bit
Copy link
Contributor

Description

This PR fixes an issue with how we're using react-datepicker. Currently, the package has a bug where the date/time input only accepts local time. This PR is a workaround so our date/time is displayed and saved as UTC as expected.

Link to react-datepicker's issue: Hacker0x01/react-datepicker#1787

Testing instructions

Test the following with date/time in daylight savings and not in daylight savings.

  1. Navigate to the course outline page.
  2. Configure a subsection.
  3. Change the time on a due date.
  4. The time on the input should be the time you selected.
  5. Save.
  6. The due date shown should be the time you selected.
  7. Navigate to the course details page.
  8. Repeat the testing steps above for the course end date field.

Other information

https://2u-internal.atlassian.net/browse/TNL-11542

@rayzhou-bit rayzhou-bit requested a review from a team as a code owner April 10, 2024 18:47
@KristinAoki KristinAoki linked an issue Apr 10, 2024 that may be closed by this pull request
@rayzhou-bit rayzhou-bit merged commit aaf4989 into master Apr 10, 2024
4 checks passed
@rayzhou-bit rayzhou-bit deleted the fix--react-datepicker-workaround-for-local-time branch April 10, 2024 19:57
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.

Datepicker and UTC
2 participants