mmazzarolo / react-native-modal-datetime-picker

A React-Native datetime-picker for Android and iOS
MIT License
2.96k stars 396 forks source link

iOS keyboard input for mode="time" breaks the UI #727

Open enagorny opened 9 months ago

enagorny commented 9 months ago

Environment

System: OS: macOS 14.1.1 CPU: (10) arm64 Apple M1 Pro Memory: 225.75 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 18.17.1 path: ~/.asdf/installs/nodejs/18.17.1/bin/node Yarn: Not Found npm: version: 9.6.7 path: ~/.asdf/plugins/nodejs/shims/npm Watchman: version: 2023.08.14.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.12.1 path: /Users/enagorny/.asdf/shims/pod SDKs: iOS SDK: Platforms:

Platforms

iOS

Versions

Description

Standard iOS picker in "time" mode allows keyboard input. To trigger it user needs to tap on the center (currently selected time). The keyboard covers the picker.

SCR-20231219-unry

I've already provided a patch for the date-time-picker https://github.com/react-native-datetimepicker/datetimepicker/issues/852 but not sure if disabling keyboard input is the right way.

Reproducible Demo

      <DateTimePickerModal
        isVisible={Boolean(datePickerField)}
        mode="time"
        onConfirm={handleConfirm}
        onCancel={() => setDatePickerField(undefined)}
        is24Hour={false}
      />
ravir-simform commented 7 months ago

@enagorny Did you get any solution for this?

enagorny commented 7 months ago

it can be fixed by applying patch in react-native-datetimepicker https://github.com/react-native-datetimepicker/datetimepicker/issues/852

ravir-simform commented 7 months ago

Great, let me take a look at it, thanks for the prompt response.