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

Adds onDayPickerShow to complement onDayPickerHide #831

Merged
merged 1 commit into from
Feb 21, 2019

Conversation

kylekthompson
Copy link
Contributor

👋 Hello.

While working with react-day-picker, I ran into a situation where I wanted to know whether the day picker was open. To help with figuring that out, this PR exposes an onDayPickerShow callback to complement the onDayPickerHide callback that already exists.

Typically I'd instead opt for keeping the showOverlay state local to my own component and use this as a controlled component, but it doesn't look like that is possible (if we'd rather have the ability to do that, I'm willing to open a PR or modify this one to support that instead, but I think we'd still need this callback to know when to set that state to true)

@codecov
Copy link

codecov bot commented Nov 21, 2018

Codecov Report

Merging #831 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #831   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          15     15           
  Lines         645    647    +2     
  Branches      141    142    +1     
=====================================
+ Hits          645    647    +2
Impacted Files Coverage Δ
src/DayPickerInput.js 100% <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 39ad48e...8551453. Read the comment docs.

@gpbl
Copy link
Owner

gpbl commented Feb 21, 2019

Good idea, thanks!

@gpbl gpbl merged commit 56e8452 into gpbl:master Feb 21, 2019
kimamula pushed a commit to kimamula/react-day-picker that referenced this pull request Aug 17, 2022
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