react-native-neat-date-picker
react-native-neat-date-picker copied to clipboard
Suggestions
Hello,
I have several suggestions. I loved this library for its year selection so i wanted to point out some things.
- all data types needs to be refactored, because onConfirm date is only object. Yeah it is an object, but it has some keys as documentation says.
- turn everything to functions instead of functional component (const).
- allow developers to pass custom translations.
- On NeatDatePicker.tsx line 150, there is typescript error.
- PLEASE PLEASE use useMemo --- on every date change, react re renders all date numbers, this causes performance issues such as low fps because set state rerenders, but rendering components with usememo doesnt cause them to rerender.
- you can go forward even when maxDate selected on year select modal?
- dateStringFormat needs to revisited, no need for long array of possible strings, just use replace with {DAY} and stuff.
- documentation needs to be refactored because some data types wrong or missing
These are all that came up to my mind. I didnt wanted to mess with library itself so i copied to my locale and heavly customized the library for my needs.
- Add ok button to year modal. Also, remove the content component its unneccesary.
- Allow passing a color for dates that are disabled by
minDate
ormaxDate
.
(Awesome library by the way, that's a ton : ))