In a way this would be addressed with https://github.com/airbnb/react-dates/issues/25, but I think a user expects that clicking on a pre-selected date, or manually entering a date, would navigate to that date in the calendar popover.
Hmm I think actually https://github.com/airbnb/react-dates/issues/48 is more inline with this prompt. If the visible month itself was controlled, then we'd be able to set it based on whether start date or end date was in fact focused.
Unfortunately, there are a lot of open questions about the animation in particular that I would want to address.
ok, thanks - had a feeling that is the case - I will close this since it looks like #48 would provide the ability to introduce this behavior
I'm not sure if this is the same request or not, but I was able to solve this with:
[...]
initialVisibleMonth={
() => {
if (this.state.focusedInput === 'endDate') {
return this.state.endDate;
} else {
return this.state.startDate;
}
}
}
Before, it always focused on the startDate

After implementing initialVisibleMonth, it focuses on whatever date you selected. (This is particularly helpful if the endDate is years away from the startDate)

Huge thanks for the wonderful library ✨ !
Most helpful comment
I'm not sure if this is the same request or not, but I was able to solve this with:
Before, it always focused on the
startDateAfter implementing
initialVisibleMonth, it focuses on whatever date you selected. (This is particularly helpful if theendDateis years away from thestartDate)Huge thanks for the wonderful library ✨ !