Skip to content
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

Select Date and Cancel Not Clickable on IOS - View not in SafeArea #424

Closed
knightmate opened this issue Sep 10, 2024 · 6 comments
Closed
Labels
bug Something isn't working needs more info Needs more information needs repro Needs reproducible example stale

Comments

@knightmate
Copy link

Current behaviour

On the iOS platform, the "Select Date" and "Cancel" icons are appearing in the top bar and are not clickable

Expected behaviour

On the iOS platform, the "Select Date" and "Cancel" icons should be under SafeArea View

How to reproduce?

Run the App on IOS and Open Calendar Modal

Preview

Screenshot 2024-09-10 at 1 32 25 PM

What have you tried so far?

I have fixed this by giving Maring from top,
modalRoot: {
justifyContent: 'center',
alignItems: 'center',
flex: 1,
marginTop:Platform.OS==="ios"?40:0
},

Your Environment

software version
ios 12
android x
react-native x.x.x
react-native-paper x.x.x
node x.x.x
npm or yarn x.x.x
expo sdk x.x.x
@knightmate knightmate added the bug Something isn't working label Sep 10, 2024
@iM-GeeKy iM-GeeKy added needs more info Needs more information needs repro Needs reproducible example labels Sep 10, 2024
Copy link
Contributor

Hey! Thanks for opening the issue. Can you provide more information about the issue? Please fill the issue template when opening the issue without deleting any section. We need all the information we can, to be able to help. Make sure to at least provide - Current behaviour, Expected behaviour, A way to reproduce the issue with minimal code (link to snack.expo.dev) or a repo on GitHub, and the information about your environment (such as the platform of the device, versions of all the packages etc.).

Copy link
Contributor

Hey! Thanks for opening the issue. Can you provide a minimal repro which demonstrates the issue? Posting a snippet of your code in the issue is useful, but it's not usually straightforward to run. A repro will help us debug the issue faster. Please try to keep the repro as small as possible. The easiest way to provide a repro is on snack.expo.dev. If it's not possible to repro it on snack.expo.dev, then you can also provide the repro in a GitHub repository.

@iM-GeeKy
Copy link
Collaborator

Here is a working example with SafeAreaProvider https://web-ridge.github.io/react-native-paper-dates/docs/date-picker/single-date-picker

@knightmate
Copy link
Author

knightmate commented Sep 10, 2024

Screenshot 2024-09-10 at 1 32 25 PM

@knightmate
Copy link
Author

knightmate commented Sep 10, 2024

@iM-GeeKy Is this working for you?

<SafeAreaProvider> <PaperProvider theme={theme}> <DatePickerModal mode={modeLocal as any} saveLabel={"Save"} theme={{color: "red"}} validRange={{ endDate: new Date( new Date().getFullYear(), new Date().getMonth(), new Date().getDate() ) // optional }} maxDate={new Date()} visible={isModalVisible} onDismiss={toggleModal} label="Select Date" onConfirm={ modeLocal === "single" ? handleConfirmDateSingle : handleConfirmDateRange } {...(rest as any)} /** any is used becase Library typescript has some issue */ /> </PaperProvider> </SafeAreaProvider>

Copy link
Contributor

Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs more info Needs more information needs repro Needs reproducible example stale
Projects
None yet
Development

No branches or pull requests

2 participants