Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Open to time #1748
This implements features / fixes related to opening to a particular time.
1. Scroll to time based on openToDate prop
When openToDate prop is present and selected prop is not, set the active (visible) time based on openToDate rather than the current time.
This addresses #1150.
2. Don’t display time as selected when selected prop is not present
The previous behavior was strange; it would display the current time as selected, but only if the current time exactly matched one of the time selections. E.g if you open the time window at 4:00 you will
3. Correctly calculated the closest time to the nearest interval
Previously it was setting active time to the top of the hour, unless there was an exact match.
The previous behavior was very strange; it would display the current time as selected, but only if the current time exactly matched one of the time selections. E.g if you open the time window at 4:00 you will see that time as selected, but not if you open it at 4:01 (assuming greater than 1 minute interval).
@@ Coverage Diff @@ ## master #1748 +/- ## ========================================== + Coverage 90.45% 90.46% +<.01% ========================================== Files 17 17 Lines 1226 1227 +1 Branches 208 208 ========================================== + Hits 1109 1110 +1 Misses 10 10 Partials 107 107