function setRef(element) {
    if (element) {
      element.openCalendar = () => setTimeout(() => openCalendar(), 10);
      element.closeCalendar = closeCalendar;
      element.isOpen = isVisible && isCalendarReady;
    }

    datePickerRef.current = element;

    if (outerRef instanceof Function) return outerRef(element);
    if (outerRef) outerRef.current = element;
  }
after manually changing the month by typing in the input,
if the calendar position is in top of the input
and the number of days in the new month is greater than the number of days in the previous month,
the calendar will cover the input due to its larger size.
To resolve this issue, we refresh the calendar position here.