-
Notifications
You must be signed in to change notification settings - Fork 3k
Feat on press year #482
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
base: master
Are you sure you want to change the base?
Feat on press year #482
Conversation
Kept command in line with text order for the arrows ie onPressX instead of onXPress
This will be very helpful for implementing the following: Except that in order to implement this, the
So the selected year could be set and passed back to calendar with the @tautvilas |
@tautvilas any new here? |
Any progress on merging this? I could really use this feature! |
Yes, this would be a great addition. |
</Text> | ||
{indicator} | ||
</View> | ||
<TouchableOpacity disabled={!this.props.onPressYear} onPress={this.props.onPressYear}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of the condition on the 'disabled' prop I would condition the Component used, meaning const Component = this.props.onPressYear ? TouchableOpacity : View
.
onPressArrowRight: PropTypes.func | ||
onPressArrowRight: PropTypes.func, | ||
// Handler which gets executed when press on Year / Month in header | ||
onPressYear: PropTypes.func |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this component named 'onPressYear'? The press is on both year and month. How about 'onPressHeader'?
</Text> | ||
{indicator} | ||
</View> | ||
<TouchableOpacity disabled={!this.props.onPressYear} onPress={this.props.onPressYear}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please declare 'onPressYear' prop in the CalendarHeader's propTypes.
@Inbal-Tish hello! any updates on this? |
Is it merged? |
Oh my gosh, 2 years later and this extremely useful Pull Request has not been accepted yet 😱. That means I'll need to improvisate even using a library 😳, that's really doesn't make sense to me. What's the reason for that late? |
Guys, I'm waiting for a response to my comments from the PR's writer. Please don't be rude. You are welcome to submit your own PR for this feature if you want to speed its release. |
really disappointing, why this PR is not getting accepted :( |
New PR: |
Kept command in line with text order for the arrows ie onPressX instead of onXPress
This is useful so I can implement a new component to select the month / year by clicking on it, similar to the workflow of other calendars.