Skip to content

[iOS] minimumDate and maximumDate stuck on a single time after opening in date mode #1007

@gianni-smartway-work

Description

@gianni-smartway-work

Reproducible project

https://drive.google.com/file/d/1QiI1zgxLE_APViBcMjeTcAV4PoCgiCWn/view?usp=sharing

Just need to to run with npx react-native run-ios

Bug report

I’m experiencing an unexpected behavior on iOS when using @react-native-community/datetimepicker (same issue happens with react-native-modal-datetime-picker).

I'm using 2 fields: one for choosing the date (with the props minimumDate/maximumDate) and one for choosing the time (without using props minimumDate/maximumDate) .

If I open a picker in time mode directly, it works fine: I can change the time.

But if I open a picker in date mode first and then open a picker in time mode, the time picker gets stuck on a single time (e.g., 01:00) and I cannot scroll to change it.

I even tried calling just one "Datepicker" component and changing the props dynamically, but I still get the anomaly.

#Expected Behavior

When opening the picker in time mode (after having used it in date mode with props minimumDate/maximumDate), I should still be able to freely select a time.

Steps to reproduce

  1. Prepare two field: one for choosing the date with "minimumDate"/"maximumDate" and "value" props, the other for choosing the time (no minimumDate/maximumDate, only "value" props)
  2. Open the modal for choosing a date, and confirm a random date.
  3. Open the modal for choosing a time.

Describe what you expected to happen:

  1. Since I haven't set up minimumDate and maximumDate for time mode, when opening this picker (after having used it in date mode), I should still be able to freely select a time, like Android.

Environment info

Main project: Expo SDK 52
Replicate project bug: React Native 0.76.9 (no Expo)

@react-native-community/datetimepicker: 8.2.0 / 8.4.4
iOS: Simulator with iOS 16.8
Android: Emulator Android with 16.0 (Baklava)

npx react-native info output:

System:
  OS: macOS 15.4.1
  CPU: (10) arm64 Apple M4
  Memory: 113.38 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.18.0
    path: ~/.nvm/versions/node/v22.18.0/bin/node
  Yarn: Not Found
  npm:
    version: 10.9.3
    path: ~/.nvm/versions/node/v22.18.0/bin/npm
  Watchman:
    version: 2025.04.14.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.5
      - iOS 18.5
      - macOS 15.5
      - tvOS 18.5
      - visionOS 2.5
      - watchOS 11.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.3 AI-243.24978.46.2431.13208083
  Xcode:
    version: 16.4/16F6
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.16
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.9
    wanted: 0.76.9
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions