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

Incorrect year returned when setting a maximum date on Android #859

Open
rvera opened this issue Sep 12, 2024 · 0 comments
Open

Incorrect year returned when setting a maximum date on Android #859

rvera opened this issue Sep 12, 2024 · 0 comments

Comments

@rvera
Copy link

rvera commented Sep 12, 2024

Describe the bug
When setting a maximum date 10 years in the future, and selecting a new date on the picker, it will return a date with the year of the maximum date.

Expected behavior
Return a year of the year selected (current)

To Reproduce
Add example code that reproduces the behavior.

<DatePicker
  date={new Date('2024-12-01T00:00:00')}
  onDateChange={async newDate => {
    console.log(newDate);
  }}
  mode="datetime"
  minuteInterval={60 * 30}
  maximumDate={new Date('2034-12-01T00:00:00')}
/>

Smartphone (please complete the following information):

  • OS: Android
  • React Native version: 0.74.4
  • react-native-date-picker version: 5.0.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant