skip to Main Content

I have trouble with date time picker with mode datetime, currently i use @react-native-community/datetimepicker lib for showing spinner but in iOS i need remove time, only with current day (today, monday, tuesday, … ) then date.

Anyone has suggest for that. Or this is default of iOS and we cann’t modify this.

I have try install another lib like: react-native-date-picker but behavior still same.

Thank for reading and feel free to leave a comment.

[Update]

Sorry because image not clear. I mean i want keep: First day, Month and Day. Same as image updated

enter image description here

2

Answers


  1. You need to pass prop mode="date" like

    import DateTimePicker from "@react-native-community/datetimepicker";

    <DateTimePicker
          date={date}
          onChange={handleDateChanged}
          mode="date"
        />
    
    Login or Signup to reply.
  2. You can easily done with:

    <DateTimePicker
      display="spinner"
      mode="date"
      ...
    />
    

    it looks like:
    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search