-
Notifications
You must be signed in to change notification settings - Fork 197
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
Fixing duplicate key warning when minDate or maxDate #131
Conversation
If minDate or maxDate are set, several duplicate key warnings are raised. This commit fix that. Moreover, the function binding has been moved out from the render method for performance reasons.
Thanks, I'm not the library maintainer but I came across this bug too and I'm glad you already fixed it in your branch. You should fix the indentation in your changes, though. |
For people who want to remove this warning from their browser console, I made a fork of monteiz' branch where I ran the build process, to update the imported library. With Yarn, you can use this build by running: You should also be able to grab this branch with a regular NPM install, I believe by specifying a specific commit rather than the branch name, but i haven't tried it. |
Hi @travellingprog, |
@monteiz done I also found and fixed another min/maxDate related bug in another branch (#137). And I have a 3rd branch that has both fixes (https://github.com/travellingprog/react-bootstrap-date-picker/tree/fix-makeDateValue-bug). That's the branch I'm using in my app now, installed with yarn add "https://github.com/travellingprog/react-bootstrap-date-picker#fix-makeDateValue-bug" |
Fix duplicate key warning
I've tested these changes locally, everything seems fine - the errors in the unit tests seem to be fixed by this also 👍 |
Motivation and Context
If
minDate
ormaxDate
are set, several duplicate key warnings are raised. This commit fix that.Moreover, the
handleClick
function binding has been moved out from the render method for potentially performance reasons:Types of changes
Checklist: