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

Calendar: year selection not possible #688

Closed
1 of 2 tasks
kevinbuyck opened this issue Oct 17, 2019 · 11 comments · Fixed by #689
Closed
1 of 2 tasks

Calendar: year selection not possible #688

kevinbuyck opened this issue Oct 17, 2019 · 11 comments · Fixed by #689
Assignees
Labels
🐛 Bug 📱 Components components module-specific

Comments

@kevinbuyck
Copy link

Issue type

I'm submitting a ... (check one with "x")

  • bug report
  • feature request

Issue description

Current behavior:
If I have a minimum value (e.g. today) and a maximum value (e.g. one year from today). I can't selected the current year, to select the months in the current year. I can only select the next year.

Schermafbeelding 2019-10-17 om 16 43 35

In the above screenshot:

  • I can click on 2020 and select months in 2020.
  • I cannot click on 2019 and select months in 2019.

Expected behavior:
Year selection (and month selection after that) should work for both 2019 and 2020.

Steps to reproduce:

  1. Add a rangecalendar component.
  2. Set the range and assign the onSelect function (like the documents).
  3. Set a min and max value.
  4. Use the arrow on the top left to select a year.
  5. Click on the highlighted year.

Related code:

private getMinStartDate = () => {
  const minStartDate = new Date();
  minStartDate.setHours(0, 0, 0, 0);
  return minStartDate;
};

private getMaxEndDate = () => {
  const minStartDate = this.getMinStartDate();
  const maxEndDate = new Date(minStartDate);
  maxEndDate.setFullYear(maxEndDate.getFullYear() + 1);
  return maxEndDate;
};

<RangeCalendar
  min={this.getMinStartDate()}
  max={this.getMaxEndDate()}
  range={range}
  onSelect={this.onRangeSelect}
/>

Other information:

OS, device, package version

React Native v0.61.1 on iPhone 11 Pro simulator 11.1.
React Native UI Kitten v4.2.0.
@artyorsh
Copy link
Collaborator

artyorsh commented Oct 18, 2019

@kevinbuyck Thanks for reporting multiple issues on this component 👍 We've merged fixes for your issues and hopefully will update npm package soon

@kevinbuyck
Copy link
Author

@artyorsh No problem. Nice work on the package otherwise!

@PavanTank4631
Copy link

is this resolve yet? its not working.

@artyorsh
Copy link
Collaborator

@PavanTank4631 Will be available in 4.3, we're going to publish it this week

@PavanTank4631
Copy link

@artyorsh Thank you, I am looking forward to that.

@ZeroCool00
Copy link

This is still not working.

@artyorsh
Copy link
Collaborator

@ZeroCool00 could you share a repro?

@Manengelo
Copy link

Still not working

1 similar comment
@altssolution
Copy link

Still not working

@dheerajpoonia29
Copy link

work for me, thanks

@masadsummair
Copy link

Still not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug 📱 Components components module-specific
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants