Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个用例,我必须在每个日期渲染一个图像。最初,我正在考虑react-native-calendar但找不到任何有用的东西。在这里,我将附上我想要实现的屏幕截图。
根据文档,您可以使用dayComponent属性来覆盖component.
dayComponent
component
<Calendar style={[styles.calendar, {height: 300}]} dayComponent={({date, state}) => { return ( <View> <Text style={{textAlign: 'center', color: state === 'disabled' ? 'gray' : 'black'}}> {date.day} </Text> </View> ); }} />