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

Implement showDoubleView prop #248

Merged
merged 3 commits into from
Sep 26, 2019
Merged

Implement showDoubleView prop #248

merged 3 commits into from
Sep 26, 2019

Conversation

wojtekmaj
Copy link
Owner

Closes #82

@wojtekmaj wojtekmaj added the enhancement New feature or request label Sep 26, 2019
@wojtekmaj wojtekmaj merged commit a046efd into master Sep 26, 2019
@wojtekmaj wojtekmaj deleted the double-view branch September 26, 2019 12:55
@@ -441,7 +450,7 @@ export default class Calendar extends Component {
onClick={mergeFunctions(clickAction, onClickDay)}
onClickWeekNumber={onClickWeekNumber}
onMouseLeave={onMouseLeave}
showFixedNumberOfWeeks={showFixedNumberOfWeeks}
showFixedNumberOfWeeks={showFixedNumberOfWeeks || showDoubleView}
Copy link
Contributor

Choose a reason for hiding this comment

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

@wojtekmaj thanks for the great lib!
why was showFixedNumberOfWeeks forced to true in double view?
mind if I PR to remove this?

Copy link
Owner Author

Choose a reason for hiding this comment

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

This is because otherwise the UI would look quite bad with different amount of rows on each side.

Copy link
Contributor

@frankleng frankleng Jul 17, 2020

Choose a reason for hiding this comment

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

@wojtekmaj got it. so it's subjective. ex. priceline.com implements a dual view without locking down # of weeks.
are you open to a PR to remove this?

we can make showFixedNumberOfWeeks default to true when showDoubleView is true. but can be overridden explicitly. so it won't be a breaking change.

Copy link
Owner Author

Choose a reason for hiding this comment

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

I like this idea.

felixmosh pushed a commit to felixmosh/react-calendar that referenced this pull request Nov 8, 2020
* Implement showDoubleView

* Fix tests for Navigation component

* Add unit tests for showDoubleView
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Showing two months at a time for range selection
2 participants