Skip to content

Commit 2c80550

Browse files
authored
Merge pull request #460 from rozhkovs/patch-2
fix: the calendar does not always scroll to the right side of the month when pressed on Android
2 parents 28dcac1 + 1358198 commit 2c80550

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Date/Swiper.native.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function SwiperInner({
105105
const contentOffset = e.nativeEvent.contentOffset
106106
const viewSize = e.nativeEvent.layoutMeasurement
107107
const newIndex = isHorizontal
108-
? Math.floor(contentOffset.x / viewSize.width)
108+
? Math.round(contentOffset.x / viewSize.width)
109109
: getIndexFromVerticalOffset(
110110
contentOffset.y - beginOffset,
111111
startWeekOnMonday

0 commit comments

Comments
 (0)