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
637 stars 161 forks source link

Date picker modal appearing ouside safe area #359

Closed lfpraca closed 6 months ago

lfpraca commented 6 months ago

Current behaviour

When attempting to implement a single date picker, the top of the modal would always appear behind the notification bar on android.

Additionally, the snack itself is not working on adroid, so I was unable to test if that works or not, but I tried to replicate it closely

Expected behaviour

Stay within the safe area, as it does on iOS using the documentation example

How to reproduce?

https://github.com/lfpraca/react-native-dates-test

Preview

image

What have you tried so far?

Moving the SafeAreaProvider to multiple places, removing it altogether; moving and removing PaperProvider; using SafeAreaView; using insets; using portal

Your Environment

software version
android 13
react-native 0.72.6
react-native-paper 5.11.3
node 20.7.0
npm 10.1.0
SoyDiego commented 6 months ago

@RichardLindhout

iM-GeeKy commented 6 months ago

Maybe try disableStatusBarPadding. This doesn't seem to be the case on the example in the document. https://snack.expo.dev/@fitzwabs/react-native-paper-dates-single-picker

RichardLindhout commented 6 months ago

I will release new version soon, are you sure you have configured the react-native-safe-area-context provider in your app?

RichardLindhout commented 6 months ago

Should be fixed now. Also use statusBarTranslucent through your android app