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/Datepicker: min value pager problem #680

Closed
2 tasks done
kevinbuyck opened this issue Oct 16, 2019 · 4 comments · Fixed by #681
Closed
2 tasks done

Calendar/Datepicker: min value pager problem #680

kevinbuyck opened this issue Oct 16, 2019 · 4 comments · Fixed by #681
Assignees
Labels

Comments

@kevinbuyck
Copy link

kevinbuyck commented Oct 16, 2019

Issue type

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

  • bug report
  • feature request

Issue description

Current behavior:
As soon as I set a minimum date value (native date), on a RangeDatepicker, the pager starts acting weird, you can't page the months.

rangeDatepicker_minStartDate

Expected behavior:
Pager should work like it does when no minimum date value is set.

rangeDatepicker_withoutMinStartDate

Steps to reproduce:

  1. Add a rangedatepicker component.
  2. Set the range and assign the onSelect function (like the documents).
  3. Set a minimum date value. For example: minimum should be today. (The current default minimum value is: this.dateService.getYearStart(this.dateService.today());).
  4. Use the arrows on the top right to navigate between the months. As soon as you click the right one, the days disappear.

Related code:

const minStartDate = new Date();
minStartDate.setHours(0, 0, 0, 0);

<RangeDatepicker
  min={minStartDate}
  range={range}
  onSelect={this.onSelect}
/>

Feature request

Add the ability to change the first day of the week, currently it's always Sunday, but it would be nice to have Monday as the first day of the week.

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 artyorsh added 🐛 Bug 📱 Components components module-specific labels Oct 17, 2019
@artyorsh artyorsh self-assigned this Oct 17, 2019
@artyorsh
Copy link
Collaborator

Hi 👋 Thanks for reporting this. Investigating

@artyorsh
Copy link
Collaborator

@kevinbuyck I guess the fix will be available soon as we plan to release beta

@artyorsh
Copy link
Collaborator

@kevinbuyck glad to say the fix for navigation between months and start day of week feature are available. Try updating to beta

npm i react-native-ui-kitten@beta @eva-design/eva@beta

@kevinbuyck
Copy link
Author

@artyorsh I will check it out later today or tomorrow. Nice!

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

Successfully merging a pull request may close this issue.

2 participants