diff --git a/src/TimeGrid.js b/src/TimeGrid.js index 79d991ac4..90e4029dd 100644 --- a/src/TimeGrid.js +++ b/src/TimeGrid.js @@ -382,7 +382,7 @@ export default class TimeGrid extends Component { calculateScroll(props = this.props) { const { min, max, scrollToTime, localizer } = props - const diffMillis = scrollToTime - localizer.startOf(scrollToTime, 'day') + const diffMillis = localizer.diff(localizer.merge(scrollToTime, min), scrollToTime, 'milliseconds') const totalMillis = localizer.diff(min, max, 'milliseconds') this._scrollRatio = diffMillis / totalMillis