Skip to content

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Feat on press year #482

wants to merge 3 commits into from

Conversation

rknell
Copy link

@rknell rknell commented May 10, 2018

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.

rknell added 3 commits May 11, 2018 09:54
Kept command in line with text order for the arrows ie onPressX instead of onXPress
@naomipol
Copy link

naomipol commented Aug 12, 2018

This will be very helpful for implementing the following:

30317918-395f9a32-97c9-11e7-9025-3fe408f95d77

Except that in order to implement this, the month prop needs to be passed to the onPressYear handler like this:

<TouchableOpacity disabled={!this.props.onPressYear} onPress={() => this.props.onPressYear(this.props.month)}>

So the selected year could be set and passed back to calendar with the current prop.

@tautvilas
Could it be added to pull request?
When is it going to be merged?

@naomipol
Copy link

naomipol commented Oct 3, 2018

@tautvilas any new here?

@dquessenberry
Copy link

Any progress on merging this? I could really use this feature!

@naushad-madakiya
Copy link

Yes, this would be a great addition.

</Text>
{indicator}
</View>
<TouchableOpacity disabled={!this.props.onPressYear} onPress={this.props.onPressYear}>
Copy link
Collaborator

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
Copy link
Collaborator

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}>
Copy link
Collaborator

@Inbal-Tish Inbal-Tish Jan 20, 2020

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 Inbal-Tish self-assigned this Jan 20, 2020
@ames89
Copy link

ames89 commented Apr 27, 2020

@Inbal-Tish hello! any updates on this?

@SohelKabir
Copy link

Is it merged?

@Fred-Reis
Copy link

Fred-Reis commented Aug 20, 2021

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?

@Inbal-Tish
Copy link
Collaborator

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.

@Aashir1
Copy link

Aashir1 commented Feb 19, 2022

really disappointing, why this PR is not getting accepted :(

@Altimar21
Copy link

New PR:
#1798

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

Successfully merging this pull request may close these issues.