terra-framework
terra-framework copied to clipboard
[terra-date-time-picker] DST missing hour keyboard shortcut improvement
Bug Report
Description
PR #1520 [terra-date-time-picker] Add support for date-picker and time-input keyboard shortcuts -- when completed contained a bug in the handling of keyboard shortcuts when incrementing/decrementing days if the time was set between 02:00 and 03:00 (AM) and the user moved the date over the start day of DST when there is a missing hour.
Link to the originating comment detailing the problem: ../terra-framework/pull/1520#pullrequestreview-923848063
Steps to Reproduce
For Daylight Savings handling when DST begins, the keyboard shortcuts for
+&-are performing as expected when focus is in the time input, correctly skipping the missing hour when incrementing and decrementing time (01:59++=03:00,03:00+-=01:59), but when focus is in the date input, the time is not being handled correctly.The current behavior when the date is any day before or after when DST begins, (e.g.
March 06, 2020) and the time is between 02:00 and 03:00, valid on March 6th (e.g.03/06/2020 02:30), with focus in the date input, pressing+these number counts, changes the value to:
03/07/2020 02:30(correct)03/08/2020 03:30(correct)03/09/2020 03:30(incorrect)03/10/2020 03:30(incorrect)And same is true in reverse starting with
03/12/2020 02:30with pressing-, the time is correct on03/08/2020at03:30, but should go back to02:30starting on03/07/2020:
Expected Behavior
The correct expected behavior is when starting with the time between 02:00 and 03:00 on the days before/after the start of DST (e.g. 03/06/2020 02:30), for time to shift up an hour on the day of the start of DST when the missing hour occurs, but then go back to the original time for days before or after when the missing hour does not occur. Using the same example above when pressing + these number counts, the correct values would be:
03/07/2020 02:30(correct)03/08/2020 03:30(correct)03/09/2020 02:30(correct)03/10/2020 02:30(correct)03/11/2020 02:30(correct)
UXPLATFORM-6643 logged to track internally.
