web-ridge / react-native-paper-dates

Smooth and fast cross platform Material Design date and time picker for React Native Paper
https://www.reactnativepaperdates.com
MIT License
654 stars 170 forks source link

ability to set the start year and end year of the date picker #161

Closed lydenn closed 2 years ago

lydenn commented 2 years ago

first let me thank to everyone who make this package available. i'm getting performance issue on android device. the date picker modal doesn't seem to run smoothly like other platforms(web, ios). i'm not really sure it's because of the default year range(like 400 years) or it's because of other problems. sometimes we don't need that much year range, it would be great if we can set the start year or the end year of the date picker.

RichardLindhout commented 2 years ago

It's because React Native is slow. Hopefully the Fabric update of React Native will fix things

iM-GeeKy commented 2 years ago

Introducing a start and end year would reduce the number of iterations though granted it's less than 400. I'll try to work on this in my spare time if we can get it moved.

RichardLindhout commented 2 years ago

Would maybe fix things indeed but still RN is very slow only rendering 3 months is also slow when scrolling. React Native Paper also has a lot of things going in the components but the rendering itself is slow sometimes on low Android devices

RichardLindhout commented 2 years ago

@lydenn do you have Hermes enabled?

iM-GeeKy commented 2 years ago

Introducing a start and end year would reduce the number of iterations though granted it's less than 400. I'll try to work on this in my spare time if we can get it moved.

https://github.com/web-ridge/react-native-paper-dates/pull/165

RichardLindhout commented 2 years ago

Will be released next version, but Fabric RN update in the future will probably fix rendering performance in future