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
640 stars 164 forks source link

Fix the allowEditing prop which was being accidentally ignored #264

Closed jcloquell closed 1 year ago

jcloquell commented 1 year ago

This PR fixes some issues related to the allowEditing prop that was recently added to the Date Picker Header:

  1. Prevents it from being always true regardless the value that was actually passed.
  2. Uses the allowEditing prop correctly to decide if the edit button should be displayed or not. Before, an unused inputDate prop, which was always undefined, was making the edit button not to be rendered at all, regardless of the props being passed to the component for this purpose.
RichardLindhout commented 1 year ago

Thanks @jcloquell!