Skip to content

Commit 76e6254

Browse files
authored
fix: Correct scrollToTime functionailty (jquense#2055)
* fix: Correct scrollToTime functionailty Fix the calculateScroll method in the TimeGrid jquense#2028 jquense#1717 * chore: Remove localIp bits git push * Revert "chore: Remove localIp bits" This reverts commit 0eaae8c. * chore: Remove localIp bits
1 parent 45a07ca commit 76e6254

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TimeGrid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ export default class TimeGrid extends Component {
315315
const { min, max, scrollToTime, localizer } = props
316316

317317
const diffMillis = scrollToTime - localizer.startOf(scrollToTime, 'day')
318-
const totalMillis = localizer.diff(max, min)
318+
const totalMillis = localizer.diff(min, max, 'milliseconds')
319319

320320
this._scrollRatio = diffMillis / totalMillis
321321
}

0 commit comments

Comments
 (0)