0

我正在使用这个包在日历中显示事件。它工作得很好,当一天有事件时,我添加了标记的日期数据。

import {
  Calendar,
  CalendarList,
  Agenda,
  LocaleConfig,
} from 'react-native-calendars';

我的代码

<Calendar
  enableSwipeMonths={true}
  theme={{
    textSectionTitleColor: "#b6c1cd",
    textSectionTitleDisabledColor: "#d9e1e8",
    selectedDayBackgroundColor: "#00adf5",
    selectedDayTextColor: "#ffffff",
    todayTextColor: "#485BBD",
    dayTextColor: "#2d4150",
    textDisabledColor: "#d9e1e8",
    dotColor: "#00adf5",
    arrowColor: "#485BBD",
    disabledArrowColor: "#d9e1e8",
    monthTextColor: "#485BBD",
    indicatorColor: "#485BBD",
    textDayFontFamily: "monospace",
    textMonthFontFamily: "monospace",
    textDayHeaderFontFamily: "monospace",
    textDayFontWeight: "300",
    textMonthFontWeight: "bold",
    textDayHeaderFontWeight: "300",
    textDayFontSize: 16,
    textMonthFontSize: 16,
    textDayHeaderFontSize: 16,
  }}
  onDayPress={(day) => {
    this.changeDay(day);
  }}
  markedDates={this.state.avaibleDayDotsData}
/>;

我有2个问题。

1.我怎么能看到选择的日期,我看不到什么时候改变。

标记天数和结果

  1. 我想为一天有多少事件添加 bage top of days。谢谢你。
4

0 回答 0