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

Android date and time pickers layout doesn't update on orientation change #49

Closed
starsnostars opened this issue Oct 21, 2019 · 3 comments

Comments

@starsnostars
Copy link

starsnostars commented Oct 21, 2019

Bug

On android, neither DatePickerDialog nor TimePickerDialog update their layout on orientation change. This results in parts of view being cut off if user opens up either of these pickers and then changes their device orientation.

Environment info

React native info output:

System:
    OS: Windows 7
    CPU: (4) x64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
    Memory: 13.04 GB / 31.78 GB
  Binaries:
    Node: 10.15.2 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.15.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
    Watchman: 4.9.4 - C:\watchman\watchman.EXE
  SDKs:
    Android SDK:
      API Levels: 23, 25, 26, 27, 28
      Build Tools: 27.0.3, 28.0.2, 28.0.3, 29.0.2
      System Images: android-25 | Google APIs Intel x86 Atom, android-25 | Google APIs Intel x86 Atom_64, android-25 | Google Play Intel x86 Atom, android-26 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom
  IDEs:
    Android Studio: Version  3.5.0.0 AI-191.8026.42.35.5791312
  npmPackages:
    react: 16.9.0 => 16.9.0
    react-native: 0.61.2 => 0.61.2

Library version: 2.1.0

Steps To Reproduce

  1. Add DateTimePicker to your component.
  2. Open it on android in either date or time mode
  3. Change orientation from portrait to landscape or vice-versa

Describe what you expected to happen:

  1. The dialog should be recreated preserving its previous state, but with a new layout (either portrait or landscape to match device's configuration)
@nishanttatva
Copy link

@vonovak Any updates? Is this in the pipeline?

@HengJunXi
Copy link

Any updates?

@vonovak
Copy link
Member

vonovak commented Mar 12, 2022

hello,
both portrait and landscape modes work fine for me. If there are some issues with how UI is updated, such as in #332, I'm afraid that is out of our reach here.

If you believe there is a bug in the package, please open a new issue and include a reproduction.

thank you 🙂

o_land_

o_portrait

@vonovak vonovak closed this as completed Mar 12, 2022
@react-native-datetimepicker react-native-datetimepicker locked and limited conversation to collaborators Mar 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants