xgfe / react-native-datepicker

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

Got weird view on IOS #444

Closed dorbenzvi closed 3 years ago

dorbenzvi commented 3 years ago

Issue

I got this view on IOS while on android its works fine:

image

Expected Behavior

Expected to get the scroller like this:

image

Code


      <DatePicker
      style={{width: '80%'}}
      date={selectedDate}
      mode="date"
      placeholder="select date"
      format="DD-MM-YYYY"
      minDate="11-2-2021"
      maxDate="1-1-2022"
      confirmBtnText="Confirm"
      cancelBtnText="Cancel"
      customStyles={{
        dateIcon: {
          position: 'absolute',
          left: 0,
          top: 4,
          marginLeft: 0
        },
        dateInput: {
          marginLeft: 36
        }
        // ... You can check the source to find the other keys.
      }}
      onDateChange={(date) => {setDate(date)}}

Environment

  1. react-native -v:
  2. node -v:
  3. npm -v:
  4. yarn --version:
  5. target platform: iOS
  6. operating system: IOS 14.4
VitamineC commented 3 years ago

Same problem

vhuerta commented 3 years ago

look at this https://github.com/xgfe/react-native-datepicker/issues/425#issuecomment-763307785

dorbenzvi commented 3 years ago

@vhuerta WORKS!!! Thanks, I have spent hours on that!