farhoudshapouran / react-native-ui-datepicker

Customizable React Native 📅 DatePicker component for Android, iOS, and Web. It includes single, range and multiple modes and supports different locales.
https://farhoudshapouran.github.io/react-native-ui-datepicker/
MIT License
275 stars 28 forks source link

Timepicker has performace issues #47

Closed Elolawyn closed 1 month ago

Elolawyn commented 6 months ago

The spinning wheels work really bad. In case the animation add too many performance issues and problems, could they be changed to pressables with numbers like the Date section?

farhoudshapouran commented 6 months ago

Yes time picker has performance issues and I will change the time picker animation methods

Elolawyn commented 6 months ago

How about instead of the 2 spinning wheels that require complex calculations and animations, just adding one vertical (or horizontal) ScrollView for each spinner with some fade effect on the sides.

If taking into account this approach, it could be useful to have 2 events (one when the spinner starts to spin and one when a new value is recovered) because other libraries that use spinners does not update value until spinners stop working and the user can press some "Accept" button to exit datepicker with new value but that value was not updated because the spinner was still spinning, so we can use this onStartSpinning event to disable the confirmation button.

peterzanetti commented 5 months ago

Time picker is still unusable, was this actually updated?

NekodRider commented 4 months ago

Same for me. The time picker is laggy on my Android/iOS phones, and only works fine on PC&iPad.

I think it might take time to look into it. Giving an option to use pressables instead is a good solution.

mlhtnc commented 3 months ago

It looks like PR did not solve the issue. Is there any improvement plan soon?

farhoudshapouran commented 1 month ago

Please upgrade to the latest version I changed the time picker component. https://github.com/farhoudshapouran/react-native-ui-datepicker/commit/e7d93648680d4f10ee5aec77244d633abe128254