gusparis / react-native-month-year-picker

React Native Month Picker component for iOS & Android
MIT License
105 stars 73 forks source link

Scroll multiple Items at once not possible (Android) #58

Closed crystalcase closed 3 years ago

crystalcase commented 3 years ago

When trying to scroll multiple months or years at once, the animation is shown but jumps back to the previous selected item. From a user perspective it feels weird to be resetted after scrolling a few months at once.

In my case only tapping item by item through the list makes it possible to select something.

Also as a sidenote: It would be awesome to be able to jump from December 2020 to January 2021 with one click.

Hit me up, if you need further information

gusparis commented 3 years ago

Hey @crystalcase ! thanks for using the lib. Are you sure is not jumping back because you have set either a min or max dates? Because that's the expected behaviour when you set those props.

gusparis commented 3 years ago

Regarding the sidenote, I'm working on a month infinite scroll atm, to accomplish what you're proposing, but don't have an eta yet 😞

crystalcase commented 3 years ago

Hey @crystalcase ! thanks for using the lib. Are you sure is not jumping back because you have set either a min or max dates? Because that's the expected behaviour when you set those props.

Yes you are right, I set those props and forgot to change them. I set both to new Date() and did not notice it. Although max and min dates do not have the expected behaviour, because I can still select dates beyond. Just with single taps. I would expect everything beyond max and min being disabled. Is the current behaviour intended?

Regarding the sidenote, I'm working on a month infinite scroll atm, to accomplish what you're proposing, but don't have an eta yet 😞

Sounds great, with fixing the scrolling it is fine and would just be a nice to have feature.

gusparis commented 3 years ago

@crystalcase not expected, but on Android it has a weird behavior when you are fast-scrolling I couldn't fix. I'll give it a shot during the holidays.

crystalcase commented 3 years ago

@crystalcase not expected, but on Android it has a weird behavior when you are fast-scrolling I couldn't fix. I'll give it a shot during the holidays.

Not exactly what I mean. If January 2021 is max I can fast scroll to January 2021. With single tapping I can choose February 2021, too. Not what I expected by setting a max date

gusparis commented 3 years ago

But when you tap on a date above max (or below min) it should go back to the previous set value. If not, there is a bug there.

crystalcase commented 3 years ago

But when you tap on a date above max (or below min) it should go back to the previous set value. If not, there is a bug there.

Maybe you should test it, but in my usage it looks like a bug. It does not work with scrolling, but with single tabs on the fields

gusparis commented 3 years ago

Will do. Keep posted for new versions. Thank you for taking the time to test the library and sharing your findings 👍🏼