Skip to content

Commit 742fe74

Browse files
committed
Merge branch 'master' into release
2 parents 156ebdd + 3b0b695 commit 742fe74

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/commons/constants.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const isIOS = Platform.OS === 'ios';
88
const screenAspectRatio = screenWidth < screenHeight ? screenHeight / screenWidth : screenWidth / screenHeight;
99
const isTablet = (Platform as PlatformIOSStatic).isPad || (screenAspectRatio < 1.6 && Math.max(screenWidth, screenHeight) >= 900);
1010
const isAndroidRTL = isAndroid && isRTL;
11+
const isRN73 = () => Platform.constants.reactNativeVersion.minor >= 73;
1112

1213
export default {
1314
screenWidth,
@@ -16,5 +17,6 @@ export default {
1617
isAndroid,
1718
isIOS,
1819
isTablet,
19-
isAndroidRTL
20+
isAndroidRTL,
21+
isRN73,
2022
};

src/expandableCalendar/WeekCalendar/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const WeekCalendar = (props: WeekCalendarProps) => {
6969
}) :
7070
sameWeek(item, date, firstDay));
7171
if (pageIndex !== currentIndex.current) {
72-
const adjustedIndexFrScroll = constants.isAndroidRTL ? NUM_OF_ITEMS - 1 - pageIndex : pageIndex;
72+
const adjustedIndexFrScroll = (constants.isAndroidRTL && !constants.isRN73()) ? NUM_OF_ITEMS - 1 - pageIndex : pageIndex;
7373
if (pageIndex >= 0) {
7474
visibleWeek.current = items.current[adjustedIndexFrScroll];
7575
currentIndex.current = adjustedIndexFrScroll;

0 commit comments

Comments
 (0)