I am using the react-calender. There are two calendars one is the start date another one is the end date. Consider the Start date shows the may month then I choose July 1. I set the end date's default will be selected start date month(end-date should show July month) But still it shows the current month only.
Here I added codesandbox link. How to fix that issue?
https://codesandbox.io/s/nostalgic-murdock-q11cv?file=/src/App.js
Maintain 2 different states for
startDate
andendDate
and and set value based on respective state.CODESANDBOX DEMO