Javascript 反应本机日历ExpandableCalendar无法与反应本机中的RTL正常工作
我正在尝试从中使用ExpandableCalendar 我的应用程序设置为RTLJavascript 反应本机日历ExpandableCalendar无法与反应本机中的RTL正常工作,javascript,reactjs,react-native,react-native-calendars,Javascript,Reactjs,React Native,React Native Calendars,我正在尝试从中使用ExpandableCalendar 我的应用程序设置为RTLReactNative.I18nManager.allowRTL(true);ReactNative.I18nManager.forceRTL(true) 当日历展开时,我试图更改月份,它不会显示下个月或上个月的新日期,它只是显示与标题月份不同的月份名称 但是,将RTL设置为false可以修复此问题。有没有不将RTL设置为false的解决方案 通过向右/向左滑动或单击箭头更改月份后的图像: 这是react原生日历的一
ReactNative.I18nManager.allowRTL(true);ReactNative.I18nManager.forceRTL(true)代码>
当日历展开时,我试图更改月份,它不会显示下个月或上个月的新日期,它只是显示与标题月份不同的月份名称
但是,将RTL设置为false可以修复此问题。有没有不将RTL设置为false的解决方案
通过向右/向左滑动或单击箭头更改月份后的图像:
这是react原生日历的一个已知问题。它无法正确呈现子组件(日期),或者在ReactNative.I18nManager.allowRTL(true)时忽略它代码>
目前,临时解决方案是将“弹性方向”更改为“行反转”,并以相反方向渲染箭头:
<Calendar theme={'stylesheet.calendar.main': {
week: {
marginTop: 7,
marginBottom: 7,
flexDirection: isRTL ? 'row-reverse' : 'row',
justifyContent: 'space-around'
}
},
'stylesheet.calendar.header': {
header: {
flexDirection: isRTL ? 'row-reverse' : 'row',
justifyContent: 'space-between',
paddingLeft: 10,
paddingRight: 10,
alignItems: 'center',
height: 45
},
week: {
marginTop: 7,
flexDirection: isRTL ? 'row-reverse' : 'row',
justifyContent: 'space-around'
}}
}}
renderArrow={direction => <Icon type="ionicon"
name={direction === 'left'
? (isRTL ? 'arrow-forward' : 'arrow-back')
: (isRTL ? 'arrow-back' : 'arrow-forward')}
/>}
/>
}
/>
您可以在回购或零食中共享您的代码吗?