xgfe / react-native-datepicker

react native datePicker component for both Android and IOS, useing DatePikcerAndroid, TimePickerAndroid and DatePickerIOS
MIT License
2.12k stars 727 forks source link

iOS - Datepicker only showing current date #449

Closed MOwais closed 3 years ago

MOwais commented 3 years ago

I am using iOS 14.1 The date picker spinner is only showing the current date. After clicking the current date it shows a popup calendar.

In iOS 12.x it works correctly. See images below.

iOS 14.x behavior(INCORRECT):

Screen Shot 2021-06-02 at 2 17 54 PM

Expected Behavior

iOS 12.x behavior:

IMG_0294

Code


<DatePicker
                {...moreOptions}
                style={styles.dateContainer}
                date={value}
                mode="date"
                placeholder={placeholder}
                format='MM-DD-YYYY'
                confirmBtnText="Confirm"
                cancelBtnText="Cancel"
                disabled={disabled}
                // customStyles={{
                //   dateIcon: {
                //     display:'none',
                //     alignItems:'flex-end' ,
                //     color:'black'
                //   },
                // }}
                onDateChange={this.onDateChange}
              />

Environment

react: 16.11.0 => 16.11.0 react-native: 0.62.2 => 0.62.2 react-native-datepicker: ^1.7.2

MOwais commented 3 years ago

Issue is resolved here - https://github.com/xgfe/react-native-datepicker/issues/425