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

[Android] I can still select dates beyond minimumDate and maximumDate #60

Closed
apgsn opened this issue Dec 24, 2020 · 6 comments · Fixed by #61
Closed

[Android] I can still select dates beyond minimumDate and maximumDate #60

apgsn opened this issue Dec 24, 2020 · 6 comments · Fixed by #61
Labels

Comments

@apgsn
Copy link

apgsn commented Dec 24, 2020

Hi again Gustavo,
I have yet another report: on Android, I set the maximum date to December 2020 with the prop maximumDate={new Date()}, but if I carefully and slowly drag the year column I can still select the next year (2021 in this case). I can't go any further that that luckily. The same goes with minimumDate={new Date()}, I can still select 2019.
Same story with months column on both directions.

Some specs: library v. 1.6.2 (latest), Android v. 10, confirmed on several devices (Huawei, Xiaomi, Nokia).

Can you look into that? Thanks.
In the meantime, Feliz Navidad man.

@crystalcase
Copy link

I have experienced that too. I can go even further than only one. If 2010 is the limit, I can go as far as I want to. As long as I don't touch the other column, it does not get reset. Also it would be nice to disable everything beyond min and Max

@gusparis
Copy link
Owner

Hey! Yeah, I'm aware of that glitch from the very begining...the native NumberPicker component has some weird behavior I had to fix with reflection in the past. I will take a look at it again. Feliz Navidad!

@gusparis
Copy link
Owner

@crystalcase what do you mean with disable? take them away? lower the opacity?

@gusparis
Copy link
Owner

🎉 This issue has been resolved in version 1.6.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@crystalcase
Copy link

@crystalcase what do you mean with disable? take them away? lower the opacity?

I think both options are good, but I like lowering the opacity more. Like if you disable a TextInput

@gusparis
Copy link
Owner

gusparis commented Dec 28, 2020

The opacity lowering cannot be achvied with NumberPicker, as far as I know. And on Android, it doesn't render many items ahead of selected, so is kinda pointless ux-wise. Plus removing have some weird logic involved, when you change the year and you have unwanted months there, then go to another year with all the months. The way is built, the pickers populate on render, not dynamically.

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.

3 participants