Selecting a date does not highlight.

Please make our job easier by filling this template out to completion. If you’re requesting a feature instead of reporting a bug, please feel free to skip the Environment and Reproducible Demo sections.

Description

When a date is “selected”, date does highlight or un-highlight. Possible state update issues aren’t rendering selected dates?

Expected Behavior

When I click on a date, I want the blue circle to highlight.

Observed Behavior

No change happens. Whether it has markedDates or not, and whether “selected” is true or false, it retains it’s given highlghted state from initial render.

Environment

Please run these commands in the project folder and fill in their results:

  • npm ls react-native-calendars: — react-native-calendars@1.403.0
  • npm ls react-native: react-native@0.62.2

Also specify:

  1. Phone/emulator/simulator & version: android and web/expo cli or metro?/

Reproducible Demo

Won’t work with just using <Calendar ” /> (web and android)

if I add in markedDates {
“####-##-##”:{marked:true, selected:true}
“####-##-##”:{marked:true, selected:true}
}

it renders the dates as highlighted(blue circle), but if selected is put to false, it stays highlighted and vice-versa for when “selected” starts as false. When “marked”: true/false gets changed, I can see the calendar update.

I have <Calendar
style={styles.calendar}
minDate={this.state.minDate}
onDayPress={(day) => {this.selectDate(day)}}
markedDates={this.state.availableDates}
markingType={‘single’}
/>

but blocking out all the given props has no effect. The base still does not highlight.

1 possible answer(s) on “Selecting a date does not highlight.