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

Use dayPickerProps controlled month before value. #612

merged 4 commits into from Mar 5, 2018


2 participants

kradical commented Jan 22, 2018

Hello @gpbl !

First thank you for your time commitment to this project, it is very useful!

This change is a re-ordering of how the current month is calculated from props. I believe it should use the controlled month from dayPickerProps.month before it uses the current value.

My specific use case is a 4-month calendar using the DayPickerInput date range selection with a from/to input. In my case I want the first month in the 4 month range to show the start of the range but it will default to using the current value. Which on the to DayPickerInput will possibly be a different month.

Otherwise I don't think there is a way to use DayPickerInput as a controlled component (w/ redux-form for us) and control the month through props.

Let me know if there is anything else I can provide to make this easier!

kradical and others added some commits Jan 22, 2018


This comment has been minimized.

codecov bot commented Jan 22, 2018

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #612   +/-   ##
  Coverage     100%   100%           
  Files          15     15           
  Lines         621    619    -2     
  Branches      133    132    -1     
- Hits          621    619    -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 3156e3d...34c8d1a. Read the comment docs.


This comment has been minimized.


gpbl commented Feb 23, 2018

Thanks @kradical I'd review this soon :) Just catching up with the older stuff .

@gpbl gpbl merged commit 3312f22 into gpbl:master Mar 5, 2018

3 checks passed

ci/circleci: checkout-and-test Your tests passed on CircleCI!
codecov/patch 100% of diff hit (target 100%)
codecov/project 100% (+0%) compared to 3156e3d

@gpbl gpbl added the v:patch label Mar 5, 2018

@gpbl gpbl added this to the v7.1.0 milestone Mar 5, 2018


This comment has been minimized.


gpbl commented Mar 5, 2018

Published as v7.1.0.


This comment has been minimized.


kradical commented Mar 5, 2018

awesome! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment