question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Calendar: year selection not possible

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:10

github_iconTop GitHub Comments

1reaction
artyorshcommented, 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

0reactions
dheerajpoonia29commented, May 30, 2021

work for me, thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Calendar control with year selector doesn't work
I am trying to display year & month selector for p-calendar control. I modified the demo app with this code : Code: Select...
Read more >
how to use PrimeNG calendar with yearNavigator (doesn't work)
I wanted to use the primeng calendar with month and year selector. I copy-paste the code example from their site, but I don't...
Read more >
Calendar date dropdown selection does not work
When you select a new date or time using the drop down box in the My Calendar plugin you get erratic results. If...
Read more >
<input type="date"> - HTML: HyperText Markup Language
The result is that only days in April 2017 can be selected — the month and year parts of the textbox will be...
Read more >
Add a holiday to the project calendar - Microsoft Support
Click Project > Properties > Change Working Time. · Select a calendar from the For calendar list, and then click the holiday on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found