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 openDirection prop #653

Merged
merged 1 commit into from
Sep 7, 2017

Conversation

timhwang21
Copy link
Collaborator

@timhwang21 timhwang21 commented Jul 29, 2017

Fixes #648.

  • Add openDirection prop to <DateRangePicker/>, <SingleDatePicker/>, <DateRangePickerInputController/>, <DateRangePickerInput/>, <SingleDatePickerInput/>, `
  • Add SCSS variables for input font size, padding, etc. (used in calculation for open-up absolute positioning)
  • Add stories and tests for new prop

@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.243% when pulling 20e3da6 on timhwang21:timhwang21/648-open-upwards into 83d55bf on airbnb:master.

ljharb
ljharb previously approved these changes Jul 29, 2017
Copy link
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.

Seems pretty solid.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.473% when pulling 20d3044 on timhwang21:timhwang21/648-open-upwards into 9685cc9 on airbnb:master.

@samdjstevens
Copy link

Is there anything stopping this being merged currently? Would love to see this go in!

@timhwang21
Copy link
Collaborator Author

Ah, I'll resolve the merge conflicts when I have a sec, hopefully today or tomorrow.

Addresses react-dates#648.

* Add `openDirection` prop to `<DateRangePicker/>`, `<SingleDatePicker/>`, `<DateRangePickerInputController/>`, `<DateRangePickerInput/>`, `<SingleDatePickerInput/>`, `<DateInput/>
* Add SCSS variables for input font size, padding, etc. (used in calculation for open-up absolute positioning)
* Add stories and tests for new prop
Copy link
Collaborator

@majapw majapw left a comment

Choose a reason for hiding this comment

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

Seems legit to me

@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.5% when pulling cdf779e on timhwang21:timhwang21/648-open-upwards into 2d56f39 on airbnb:master.

@majapw majapw merged commit 1c85778 into react-dates:master Sep 7, 2017
@samdjstevens
Copy link

Cheers @timhwang21 @majapw !

@timhwang21 timhwang21 deleted the timhwang21/648-open-upwards branch September 7, 2017 12:07
@ASH-khan
Copy link

@majapw - so can we take care of singleDatePicker based on viewport height or width?
so in my case by default i want to open calendar down, and if i am at the bottom of the page want calendar to open Up.

please advise?
thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor: new stuff Any feature or API addition.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants