Closed JPStrydom closed 10 months ago
@JPStrydom
Here is a code snipped in the example app on our repo.
<View
style={[
{
alignItems: 'center',
flexDirection: 'row',
marginTop: 16,
},
]}
>
// This could be an icon or any other view...
<Button>Test</Button>
<DatePickerInput
locale={locale}
value={inputDate}
onChange={setInputDate}
inputMode="start"
autoComplete={'birthdate-full'}
style={styles.marginBottomEight}
/>
</View>
I've created a PR which should address this issue.
This PR looks like it did the trick 👍
Going to close this for now. Happy to reopen it if anyone has any issues with it.
Hi @JPStrydom, your PR was working good in your use case, but has problem in Mobile (check the images of @iM-GeeKy above).
I have created a new PR: https://github.com/web-ridge/react-native-paper-dates/pull/329 If you can check it too, would be perfect to test all devices and ways. I think with my code I solved both issues:
I hope be the correct solution, If not, we will continue researching.
@iM-GeeKy maybe you should open this issue until we solve it :)
I'll take a look at the new version today and confirm if it's still working on web 👍
I'll take a look at the new version today and confirm if it's still working on web 👍
Great, I will wait. Thanks
I'll take a look at the new version today and confirm if it's still working on web 👍
Looks like all is still in order on the web version 👍
Great, thanks for your confirmation. Happy all is working ok 👌
Current behaviour
When running on web (with React Native Web) the
DateInputField
does not scale to the width of it's parent container, where it used to do so.Here is the behavior on version![rnpd-new](https://github.com/web-ridge/react-native-paper-dates/assets/25905330/a5677473-e5d3-451d-935c-6ec6d4ac1f10)
0.18.19
:Expected behaviour
The
DateInputField
should respond to width changes on web.Here is the behavior on version![rnpd-old](https://github.com/web-ridge/react-native-paper-dates/assets/25905330/c2508f5a-d237-4692-bc57-0fbf6de10f74)
0.18.14
:How to reproduce?
Place the
DateInputField
in aView
that scales to 100% of available width:What have you tried so far?
Changing the following code in
src/Date/DatePickerInputWithoutModal.tsx
seems to fix the issue:Your Environment