-
-
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
Add support for handling mouse up and down on days #445
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Would you mind to add a test (in 'test/daypicker/events') and lint the files?
src/Month.js
Outdated
@@ -54,6 +54,8 @@ export default class Month extends Component { | |||
onDayKeyDown: PropTypes.func, | |||
onDayMouseEnter: PropTypes.func, | |||
onDayMouseLeave: PropTypes.func, | |||
onDayMouseDown: PropTypes.func, | |||
onDAyMouseUp: PropTypes.func, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✍️ This should be written onDayMouseUp
(with lowercase A)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me fix these items up.
Codecov Report
@@ Coverage Diff @@
## master #445 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 16 16
Lines 516 516
Branches 102 102
=====================================
Hits 516 516
Continue to review full report at Codecov.
|
Added tests and eslint runs clean. Also added API doc. |
Awesome! Thanks a lot 👍 |
Published as v6.1.0 |
This PR adds the ability to add handlers for mouseUp and mouseDown events on days. This allows one to select dates by moving the mouse over the days while holding down the mouse button.