Datetimepicker: iOS date picker position

Created on 12 Oct 2019  路  14Comments  路  Source: react-native-datetimepicker/datetimepicker

Question

In iOS the datepicker appears not on bottom like a keyboard but floating in the middle of the screen. Is there a way to display it like a keyboard on bottom?

Most helpful comment

The original authored version mmazzarolo/react-native-modal-datetime-picker had:

Under the hood this library is using react-native-modal for the iOS modal implementation.

This is very important feature which seems to be not yet implemented in this migrated version. 鈽癸笍

Most of the users of this library must be looking for a non-inline solution i.e. which opens the picker in a modal or popup.

All 14 comments

Same problem.

@netgfx do you found solution?

not yet unfortunately...

For me it just appears right under the button clicked to show it. I followed the example code on an entirely empty page with the same result.

Further it doesn't have any confirmation / cancellation like it used to or like the Android equivalent now has (which means you have to manually hide it if you don't want it to disappear straight after scrolling one of the wheels).

Yes I have the disappearing bug as well

I don't believe this is a bug. The picker component simply generates the scroller. You have to wrap it in whatever GUI you want it to appear in. A modal with some transparency will accomplish what you want.

Watch this video snippet (for just the first few minutes) of how to style a picker to be at the bottom: https://youtu.be/UiWgN39R9GA?t=230

However, later in that video he completely gets rid of the picker, which I would not suggest.

Well, I would say this is a bug since it worked in previous versions.

Why don't show the DatePicker like in this version or include an option to show it in a modal for IOS so we will have a good and standard UX in both (Android/IOS)?

https://github.com/mmazzarolo/react-native-modal-datetime-picker

The original authored version mmazzarolo/react-native-modal-datetime-picker had:

Under the hood this library is using react-native-modal for the iOS modal implementation.

This is very important feature which seems to be not yet implemented in this migrated version. 鈽癸笍

Most of the users of this library must be looking for a non-inline solution i.e. which opens the picker in a modal or popup.

+1

+1

+1

+1

hello, it's up to library consumers to render the picker where they see fit, whether it is inline or at the bottom of the screen or in a full screen modal. There is currently no plan to implement this, and library consumers can decide this on their own - and you can potentially publish your solution for others to use, just like with react-native-modal-datetime-picker. Thank you.

Was this page helpful?
0 / 5 - 0 ratings