I'm using the wix calendar in react native. But there was a problem. Static data in the marking part of the calendar is marked, but the selected date is not marked. I have confirmed that the marking will be static on the homepage, but is there any way to dynamically mark it? here's code what i do

  <Calendar
       onDayPress={day => {
         this._setSelectedDate(day.year + "-" + day.month + "-" + day.day);
                    }}
        minDate={this.state.today}
        markedDates={{
        [this.state.selectedDate]: {
        selected: true,
        marked: true,
        selectedColor: 'blue'
         }
      }}
    />

.

_setSelectedDate = date => {
    this.setState({
        selectedDate: date,

    });
};

0 Answers