react-native - 具有多点和周期标记样式的 React Native 日历
解决方案
您可以使用react-navtive-calendar。
<Calendar
// Collection of dates that have to be colored in a special way. Default = {}
markedDates={{
'2012-05-20': {textColor: 'green'},
'2012-05-22': {startingDay: true, color: 'green'},
'2012-05-23': {selected: true, endingDay: true, color: 'green', textColor: 'gray'},
'2012-05-04': {disabled: true, startingDay: true, color: 'green', endingDay: true}
}}
// Date marking style [simple/period/multi-dot/custom]. Default = 'simple'
markingType={'period'}
/>
用于标记
<Calendar
// Collection of dates that have to be marked. Default = {}
markedDates={{
'2012-05-16': {selected: true, marked: true, selectedColor: 'blue'},
'2012-05-17': {marked: true},
'2012-05-18': {marked: true, dotColor: 'red', activeOpacity: 0},
'2012-05-19': {disabled: true, disableTouchEvent: true}
}}
/>
推荐阅读
- java - 当我使用颤振运行本机代码时出现一些错误
- android - 在后台获取设备位置和 Android 后台限制
- reactjs - 错误 TS18003:当我尝试运行 React 教程时,在配置文件 'tsconfig.json' 中找不到输入
- javascript - 用JS检查html表列中的值
- linux - 如何从 Docker 容器访问 JACK 音频
- imagemagick - Imagemagick 没有在修剪上定义图像
- python - 使用 Beautiful Soup select 或 lxml xpath 从 html 获取 href
- vue.js - 如何使用事件总线正确地将数据从子组件传递到父组件?
- android - 放置意图过滤文件的目录
- python - 如何处理TypeError:必须是str,而不是float