Skip to content

[Bug]: Using both minimumDate and maximumDate causes delay on android #944

@rbl-simonamanu

Description

@rbl-simonamanu

Describe the bug

If I set
minimumDate={new Date(2000, 0, 1)}
maximumDate={new Date(2030, 11, 31)}
on android it takes a few seconds (~5-10) to open the DatePicker modal, this is how I use it:


 <DatePicker
          modal
          date={new Date()}
          minimumDate={new Date(2000, 0, 1)}
          maximumDate={new Date(2030, 11, 31)}
          open={isDateTimePickerVisible}
          onConfirm={handleChangeDateTime}
          onCancel={handleCloseDateTimePickerModal}
        />

If I use only one of the props (minimumDate or maximumDate), the modals open immediately.

"react-native": "0.79.5",
"react-native-date-picker": "5.0.13",

Expected behavior

The DatePicker modal should open once I set the open prop.

To Reproduce

<DatePicker
          modal
          date={new Date()}
          minimumDate={new Date(2000, 0, 1)}
          maximumDate={new Date(2030, 11, 31)}
          open={isDateTimePickerVisible}
          onConfirm={handleChangeDateTime}
          onCancel={handleCloseDateTimePickerModal}
        />

Operating System

  • Android
  • iOS

React Native Version

0.79.5

Expo Version (if applicable)

No response

react-native-date-picker version

5.0.13

React Native Architecture

  • Old Architecture (Paper)
  • New Architecture (Fabric)

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions