Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 反应本机日历ExpandableCalendar无法与反应本机中的RTL正常工作_Javascript_Reactjs_React Native_React Native Calendars - Fatal编程技术网

Javascript 反应本机日历ExpandableCalendar无法与反应本机中的RTL正常工作

Javascript 反应本机日历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原生日历的一

我正在尝试从中使用ExpandableCalendar

我的应用程序设置为RTL
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')}
                                               />}
    />
}
/>

您可以在回购或零食中共享您的代码吗?