I'am trying to mark dates in react-native-calendars that i get from an api call. Can someone please help?
<Calendar
markingType={'multi-dot'}
markedDates={this.state.dates}
/>
In constructor, I am maintaining
this.state = {dates : []}
I have invoked the function marked() where I am mapping over the data and pushing the dates into another array and then doing a setState as
this.setState({
dates : {
[attendance] : [
{
key: 'vacation',
color: 'blue',
selectedDotColor: 'red'
}
]
}
})
I'am sharing the code I am at liberty to. P.S : I'am new to this. Thanks in andvance