Skip to content

BUG: scrollToTime 00h:00m doesn't work #1474

@amok

Description

@amok

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions