I am using react big calendar and I am using the start days and end days of the week for my api call here's the function I am calling to get events
getEvents(calendarId,firstday,lastDay);
this function creates the api url to hit using the calendar id and the dates for first day and last day.
so, if the calendar shows the week as 20th august - 27 august then first day is 20-08-2017 and last day is 27-08-2017 and my api url becomes
calendar/events/?start="20-08-2017"&end="27-08-2017"
for next week i.e 28-08-2017 to 3-08-2017 I want to get dates automatically from the calendar so I can use it in my api call?
the problem is that I am quite new to react-big-calendar and I dont know how to get the dates from there. I'd really appreciate it if you could provide some suggestions or advice or even point me where to look. I have been through the documentation but couldnt get what I want.
EDIT: I am using onNavigate as shown below to call the function that makes the api call
onNavigate={() => {
actions.calendar.getEvents(this.props.params.calendarId, firstday, lastday);
}}