Fixes for DatePicker - DateTimeBlock #444
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is a refactor of the DateTimeBlock feature of the Date Picker.
The expected improvements are:
Considerations on Implementation
In this refactor I used current main 2.0 as base, I will list things that were removed from 1.0 for easier review but mostly removed the logic added from this PR #392
Consolidated back Input for Date and Time since the difference between Input and InputValue was the border. Current logic also does not work with Date validation only Time range.
Removed 00 logic because I found that updating the display with the date-fns library with the useEffect prevented missing 0
There are currently two PR's open on the DatePicker, I tried to make this PR to cover the requested scenarios, since my changes affects those, I will add the developer to the review this PR.
DatePicker - 2 digit time format in the hours input field
DatePicker minute field roll over
Reviewing/Testing steps
Run Storybook on local and verify DatePicker by adding different values and changing interval option in Time and Date
I made a spreadsheet with the scenarios I used to test this PR feel free to comment on it to add some more if necessary
https://docs.google.com/spreadsheets/d/1POe9uZxKXtLhQFF6DIV-RclUp7T7oXgSeSLlbYmE38g/edit?usp=sharing
Here is an example video
Demo video