1

I use react-datepicker in my project. When I press the key, it completes automatically input. What do I need to change to work correctly like input?

Here is the code.

https://codesandbox.io/s/nifty-hopper-jm4gx

okh
  • 75
  • 1
  • 9

1 Answers1

2

The issue is with customInput, Once you remove it, it will work fine

<div className="custom-calendar">
  <span className="calendar"></span>
  <DatePicker
    ref={ref}
    name="birthday"
    dateFormat="dd/MM/yyyy"
    disabled={disabled}
    popperPlacement="right-center"
    locale="tr"
    selected={startDate || value}
    showMonthDropdown
    showYearDropdown
    onChange={(date) => onChangePicker(date)}
    yearDropdownItemNumber={100}
    maxDate={addDays(new Date(), 0)}
    scrollableYearDropdown
    autoComplete="off"
  />
</div>
Or Assayag
  • 5,662
  • 13
  • 57
  • 93