美文网首页
react-native-calendars 详解

react-native-calendars 详解

作者: glenlg | 来源:发表于2020-07-01 18:15 被阅读0次

    markedDates. 定义选中的日期样式
    通过动态组织 markedDates来自定义对应的样式。(onDayPress触发)

    2.markingType 有4种:
    markingType={'period'}
    markingType={'custom'}
    markingType={'simple'}
    markingType={'multi-dot'}

    3.dayComponent 自定义日期的显示及行为

    4.theme,定义calendar的日期,标题等样式,简单样式略过。
    注意高级样式:markingType不同时设置的高级样式要对应,
    比如设置markingType={'period'},应该用stylesheet.day.period,来作用日期的显示样式,
    要让calendar适应高度,不能设置整个高度,需要设置每个日期text的的样式来达到目的。
    不然calendar可以丢失行,或出现显示问题。
    每一个高级样式要全覆盖住原来的样式的每一个属性。
    stylesheet.calendar.header --周及周上面部分的样式
    stylesheet.calendar.main
    stylesheet.day.basic --
    stylesheet.day.single
    stylesheet.day.period --markingType={'period'}时的样式
    stylesheet.day.multiDot

    相关文章

      网友评论

          本文标题:react-native-calendars 详解

          本文链接:https://www.haomeiwen.com/subject/smyhqktx.html