-
-
Notifications
You must be signed in to change notification settings - Fork 732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clicking days on a calendar with multiple months makes it jump forward #38
Comments
/cc @anton-kabysh |
The reason for this behavior is the code added to navigate the calendar when clicking on outside days. The month should change instead only if the day has the |
@gpbl I'm still seeing this issue in the example and in my own implementation. I'm using v 7.2.4 of the library. |
@HNBowen which example? Here it works: https://codesandbox.io/s/x9rpwqrlz4?module=/example |
@gpbl Sorry, I actually meant the Day Picker Input example. My bad! You can see the behavior I'm talking about in the 'Works with input fields' example on the react-day-picker.js.org home page. Clicking on the second month in the 'Range of days' calendar advances the calendar to the next month. I think it may be this line? react-day-picker/src/DayPickerInput.js Line 500 in 39ad48e
Clicking on a valid day resets the month of the overlay to the month of the day clicked, which I believe advances the calendar and causes the jump. Is this by design? Any advice for stopping the calendar from jumping ahead? |
@HNBowen oh I see. It looks like the react-day-picker/docs/src/code-samples/examples/input-from-to.js Lines 66 to 72 in 2e93623
|
@gpbl You got it! |
For example, in the Range of days example when clicking on a day on the right month, it makes it jump to the next month.
The text was updated successfully, but these errors were encountered: