Skip to content
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

Merged
merged 4 commits into from
Jul 9, 2017

Conversation

eldritchideen
Copy link
Contributor

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.

Copy link
Owner

@gpbl gpbl left a 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,
Copy link
Owner

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)

Copy link
Contributor Author

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
Copy link

codecov bot commented Jul 4, 2017

Codecov Report

Merging #445 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #445   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          16     16           
  Lines         516    516           
  Branches      102    102           
=====================================
  Hits          516    516
Impacted Files Coverage Δ
src/Day.js 100% <ø> (ø) ⬆️
src/Month.js 100% <ø> (ø) ⬆️
src/DayPicker.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28a36cb...dc11b27. Read the comment docs.

@eldritchideen
Copy link
Contributor Author

eldritchideen commented Jul 4, 2017

Added tests and eslint runs clean. Also added API doc.

@gpbl gpbl added this to the v6.0.6 milestone Jul 9, 2017
@gpbl gpbl merged commit a94ba5b into gpbl:master Jul 9, 2017
@gpbl
Copy link
Owner

gpbl commented Jul 9, 2017

Awesome! Thanks a lot 👍

@gpbl
Copy link
Owner

gpbl commented Jul 9, 2017

Published as v6.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants