Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Value is not updated on DayPickerInput when value prop is in a different month #535
There is a From and To DayPickerInput element on a page. Both have a value that comes from state.
Issue has been reproduced at:
Use the following steps to reproduce:
Scenario 2 (NOTE: refresh the browser to start again):
Scenario 3 (NOTE: refresh the browser to start again):
So I've forked the project planning on making a PR to fix this, but I've run into a problem. I wrote the following unit test expecting it to fail, but it passes.
My next thought was to check how the datePicker handles having the prop passed down to it, but the datePicker isn't even rendered at the point this bug occurs so it shouldn't affect it right? Can you see at a glance what I'm doing wrong here?
Yeah I tried it with the
Just a quick update: After playing around with this a bit I've noticed the test is passing because the value of month is actually being updated. Internally the DayPickerInput has the right value, it's just not updating the text. I'll look into this further later.