-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
BUG: scrollToTime 00h:00m doesn't work #1474
Comments
Used your
Not that in your code |
@Dragomir-Ivanov that's true
when you |
@amok I didn't looked at the code, however your advice seems reasonable. In any case, explicit check for 0 will be needed. Perhaps you can make a PR? |
@Dragomir-Ivanov done. pls take a look at #1501 |
@amok Good work, mate! |
Do you want to request a feature or report a bug?
Report a bug
What's the current behavior?
scrollToTime prop does not work if the value's date has
00h 00m
demo: https://codesandbox.io/embed/react-big-calendar-issue-scrolltotime-dp9zy
video: https://monosnap.com/file/dP5aEOh73L2K7Z7IfU2XJQtNnxdtJS
It mostly likely happens because of this check https://github.com/intljusticemission/react-big-calendar/blob/master/src/TimeGrid.js#L261 - scrollToTime is not being applied because
this._scrollRatio
is zero (false) (calculated at line https://github.com/intljusticemission/react-big-calendar/blob/master/src/TimeGrid.js#L275)What's the expected behavior?
view scrolls to top when scrollToTime has been set to
00h:00m
The text was updated successfully, but these errors were encountered: