-
-
Notifications
You must be signed in to change notification settings - Fork 765
Closed
Milestone
Description
I'm not sure if this is the intended behaviour, but I expected the initialMonth property to only be relevant on the first mount of the component. So you set an initialMonth but subsequent renders ignore it.
The current behaviour here:
https://github.com/gpbl/react-day-picker/blob/master/src/DayPicker.js#L80-L84
... updates the current month to the initialMonth when receiving props which, if you aren't storing/updating the current month in state when clicking next/prev, means the months don't switch if initialMonth is always the same value.
If that is the intended behaviour, then maybe the naming of initialMonth should be changed as it doesn't fit with how it actually works?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels