File tree 2 files changed +4
-2
lines changed
expandableCalendar/WeekCalendar
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ const isIOS = Platform.OS === 'ios';
8
8
const screenAspectRatio = screenWidth < screenHeight ? screenHeight / screenWidth : screenWidth / screenHeight ;
9
9
const isTablet = ( Platform as PlatformIOSStatic ) . isPad || ( screenAspectRatio < 1.6 && Math . max ( screenWidth , screenHeight ) >= 900 ) ;
10
10
const isAndroidRTL = isAndroid && isRTL ;
11
+ const isRN73 = ( ) => Platform . constants . reactNativeVersion . minor >= 73 ;
11
12
12
13
export default {
13
14
screenWidth,
@@ -16,5 +17,6 @@ export default {
16
17
isAndroid,
17
18
isIOS,
18
19
isTablet,
19
- isAndroidRTL
20
+ isAndroidRTL,
21
+ isRN73,
20
22
} ;
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ const WeekCalendar = (props: WeekCalendarProps) => {
69
69
} ) :
70
70
sameWeek ( item , date , firstDay ) ) ;
71
71
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 ;
73
73
if ( pageIndex >= 0 ) {
74
74
visibleWeek . current = items . current [ adjustedIndexFrScroll ] ;
75
75
currentIndex . current = adjustedIndexFrScroll ;
You can’t perform that action at this time.
0 commit comments