Skip to content

Commit

Permalink
fix: Correct scrollToTime functionailty (#2055)
Browse files Browse the repository at this point in the history
* fix: Correct scrollToTime functionailty

Fix the calculateScroll method in the TimeGrid

#2028 #1717

* chore: Remove localIp bits
git push

* Revert "chore: Remove localIp bits"

This reverts commit 0eaae8c.

* chore: Remove localIp bits
  • Loading branch information
cutterbl committed Nov 10, 2021
1 parent 45a07ca commit 76e6254
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TimeGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ export default class TimeGrid extends Component {
const { min, max, scrollToTime, localizer } = props

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

this._scrollRatio = diffMillis / totalMillis
}
Expand Down

0 comments on commit 76e6254

Please sign in to comment.