react-native-modal-datetime-picker icon indicating copy to clipboard operation
react-native-modal-datetime-picker copied to clipboard

Set currentDate to be prop.minimumDate if not null or the current date.

Open andvalsol opened this issue 7 months ago • 6 comments

Overview

For iOS if the user hasn't touched the picker, the default date is set to be the date when the picker was mounted, instead of setting the date to be the minimum date (if passed), else the current date should be selected, since the mounting of the date could be at 11:59pm and the re-render could have been at 12:00am.

Test Plan

  1. Open the picker on iOS
  2. Set the minimum date to be a different date from the current date.
  3. The picker's selected date (when clicking confirm) the returned should be the minimum date as expected, also the picker should behave as usual when other actions are taken.

andvalsol avatar Dec 01 '23 20:12 andvalsol