-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing Date Picker Modal Overlapping StatusBar in iOS #352
Conversation
This approach did not resolve my issue with modal positioning underneath statusbar. I did have a better experience using the getHeight method from nativemodules
|
I think the best approach is to use react-native-safe-area-context for this (which we already have as a dependency) |
@AnassHmida Could you refactor your changes to try the solution @RichardLindhout suggested? |
I did a fix myself, can you verify this change @AnassHmida |
Hello @joeburghard , the fix you mentioned causes a crash in android , you need to limit it to IOS only :
but other than that , it works great ! |
Hey @RichardLindhout , one second , i'm verifying this |
Hey again @RichardLindhout , it seems that the 'react-native-safe-area-context' doesn't seem to work here , i tried the latest version that you released , but now the problem seems to persist , for IOS |
No it should work I think you did not use the provider
|
react-native-safe-area-context is already a dependency for react-native-paper and this works great! I never saw this problem in my apps so it should be the provider :) |
Humm i don't know , i'm wrapping my views in a SafeAreaProvider tag , but that doesn't seem to fix anything , and i don't think it should be conditioned to be like that in the first place , i made a second PR based on @joeburghard 's answer which should be WAI. Thanks. |
Please let me know if newest release work for you, on my device it works. We have also support for all the different use cases and the pagesheet presentation style |
Hello,
This PR resolves the issue where the content of the date picker modal in iOS is displayed under the StatusBar, preventing users from interacting with the close and save buttons. The problem arose due to the use of an incorrect property for calculating the StatusBar height in the DatePickerModal component for iOS. This fix replaces the incorrect property StatusBar.currentHeight with the appropriate StatusBarManager.HEIGHT for iOS. The changes ensure that the content is properly displayed and the user can interact with the necessary buttons within the date picker modal.
Changes Made:
Fixes: #258 (comment)
Thanks.