reactjs - 为什么 react-native-calendar-picker 本身会包装其他元素?
问题描述
嗨,我是新来的本地人。我试图向应用程序添加一个日历日期选择器,它可以正常工作
反应本机日历选择器
但是我尝试在它下面添加另一个视图,但是,元素没有添加到外面,相反,日历元素的高度越来越长,并且隐藏了我在它之后添加的任何内容。
<ScrollView style={styles.scrollMain} >
<Text style={{fontSize:15}}>Mark the dates and time you are available</Text>
<View style={styles.nurseCalendar} >
<CalendarPicker
dayShape='circle'
todayBackgroundColor={'#88B3F9'}
selectedDayTextColor={"#FFFFFF"}
selectedDayStyle={styles.calendarStyle}
nextTitle='>>>'
width={340}
height={342}
restrictMonthNavigation={true}
minDate={Date.now()}
onDateChange={this.handleDateChange}
previousTitle='<<<'
></CalendarPicker>
</View>
<View>/** no matter what i add here won't show however the view above will increase in height **/</View>
</ScrollView>
这是我正在使用的样式属性:
scrollMain:{
alignContent:'center',
flexDirection:'column',
paddingTop:25,
paddingLeft:25,
paddingRight:25,
backgroundColor:'#F7F9FC'
},
nurseCalendar:{
width:'90%',
alignSelf:'center',
marginTop:25,
height:'100%',
backgroundColor:'#fff',
flexWrap:'wrap'
},
calendarStyle:{
borderColor: '#6574CF',
backgroundColor: 'dodgerblue',
color: 'white',
borderWidth: 2,
borderRadius: 50,
}
解决方案
推荐阅读
- nginx - 如何在向客户端发送响应时修复“失败(22:无效参数)”
- javascript - 在页面加载以及 setInterval 上运行 JavaScript 函数
- r - 如何使用 tidyverse 将长形转换为宽形
- algorithm - 硬币变化问题的变化背后的想法是什么?
- node.js - Node js 逐行模块
- php - 如何在这个 sql 查询中获得前 5 种食物
- c# - 如何解决从@Html.CheckBoxFor 自动生成的隐藏表单字段
- image - Xamarin 表单:基于字符串值隐藏 Flowlistview 项目,包括它在 UI 中的空间
- sql - 我想优化这个查询
- c# - 单击复选框或其文本时,如何设置选中的winform checkboxlist项目?