Skip to content

[Fix] DayPicker, DayPickerSingleDateController: Snap to new date if date is off screen#1481

Merged
ljharb merged 1 commit intoreact-dates:masterfrom
jayswain:1320
Nov 30, 2021
Merged

[Fix] DayPicker, DayPickerSingleDateController: Snap to new date if date is off screen#1481
ljharb merged 1 commit intoreact-dates:masterfrom
jayswain:1320

Conversation

@jayswain
Copy link
Copy Markdown
Contributor

@jayswain jayswain commented Nov 29, 2018

Fixes #1320

Please review and let me know if theres any additional work you'd like completed, or if you'd like it done a different way, or, if everything is horrible 👹

…if date is off screen

Fixes react-dates#1320.

Co-authored-by: Jay Swain <github@jayswain.com>
Co-authored-by: Jordan Harband <ljharb@gmail.com>
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.04%) to 85.145% when pulling ca1a78d on jayswain:1320 into 37f8aba on airbnb:master.

@GoGoCarl
Copy link
Copy Markdown
Contributor

GoGoCarl commented Dec 4, 2018

This looks legit from an eyeball inspection to me! I'll pull it down sometime this week and give it some run.

@ianduvall ianduvall mentioned this pull request Dec 11, 2018
1 task
@antoniomaia
Copy link
Copy Markdown

Any idea when this will be released?

@jayswain
Copy link
Copy Markdown
Contributor Author

jayswain commented Feb 6, 2019

There was another approach that looked like was more accepted but it also fizzled out. see #1487

@viktorsec
Copy link
Copy Markdown

I'd also find this very useful!

@ljharb ljharb added the semver-patch: fixes/refactors/etc Anything that's not major or minor. label Sep 29, 2021
Copy link
Copy Markdown
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great; I'll rebase this and land it if tests pass.

@ljharb ljharb changed the title Snap to new date if date is off screen [Fix] DayPicker, DayPickerSingleDateController: Snap to new date if date is off screen Nov 30, 2021
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 30, 2021

Codecov Report

Merging #1481 (7490089) into master (f5fa122) will increase coverage by 0.26%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1481      +/-   ##
==========================================
+ Coverage   79.88%   80.14%   +0.26%     
==========================================
  Files          57       57              
  Lines        2287     2292       +5     
  Branches      635      636       +1     
==========================================
+ Hits         1827     1837      +10     
+ Misses        271      267       -4     
+ Partials      189      188       -1     
Impacted Files Coverage Δ
src/components/DayPicker.jsx 72.11% <100.00%> (+0.27%) ⬆️
src/components/DayPickerSingleDateController.jsx 93.22% <100.00%> (+2.65%) ⬆️

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 f5fa122...7490089. Read the comment docs.

@ljharb ljharb force-pushed the 1320 branch 4 times, most recently from 5577888 to 7490089 Compare November 30, 2021 07:32
@ljharb ljharb merged commit 7490089 into react-dates:master Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-patch: fixes/refactors/etc Anything that's not major or minor.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DayPickerSingleDateController Jump to current month on date prop change

6 participants