React-date-picker: closeCalendar does not exist on type DatePickerProps

Created on 6 Apr 2020  路  5Comments  路  Source: wojtekmaj/react-date-picker

Hi, Am using trying to close the calendar with the above props method in react typescript, yet seems not to figure out what is going on here.

Any help is would be highly appreciated.

bug help wanted

All 5 comments

Try 8.0.1 that was released just today

Try 8.0.1 that was released just today

Seems not helping either. I tried npm install [email protected] the version you specified, unfortunately, this happens

image

Any news on this issue? I'm also needing it, thanks!

Looks like it doesn't exist yet. Also looks like the component type is incorrect since it's extensible with a constructor, contrary to the current type @8.0.5:

declare module "react-date-picker" {
  export default function DatePicker(props: DatePickerProps): JSX.Element;

  export interface DatePickerProps extends CalendarProps {
    calendarClassName?: string | string[];
    calendarIcon?: JSX.Element | null;
    className?: string | string[];
    clearIcon?: JSX.Element | null;
    dayPlaceholder?: string;
    disabled?: boolean;
    format?: string;
    isOpen?: boolean;
    monthPlaceholder?: string;
    name?: string;
    onCalendarOpen?: () => void;
    onCalendarClose?: () => void;
    required?: boolean;
    showLeadingZeros?: boolean;
    yearPlaceholder?: string;
  }
}

Seems like it needs to be updated?

PRs regarding TypeScript are welcome. I'm not maintaining this part of the package because I'm not familiar with TypeScript.

In the future, typings will be moved to DefinitelyTyped.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vanmanh49 picture vanmanh49  路  4Comments

DaveyEdwards picture DaveyEdwards  路  3Comments

Omortis picture Omortis  路  4Comments

adityatandon007 picture adityatandon007  路  4Comments

leo-iomer picture leo-iomer  路  8Comments