diff --git a/types/react-flatpickr/index.d.ts b/types/react-flatpickr/index.d.ts index 9d070494b4..ac470b8f64 100644 --- a/types/react-flatpickr/index.d.ts +++ b/types/react-flatpickr/index.d.ts @@ -1,12 +1,13 @@ -// Type definitions for react-flatpickr 3.7 +// Type definitions for react-flatpickr 3.8 // Project: https://github.com/coderhaoxin/react-flatpickr // Definitions by: begincalendar // snaveevans // rigothedev +// doniyor2109 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -import { Component } from "react"; +import { Component, ReactElement } from "react"; import flatpickr from "flatpickr"; export type Omit = Pick>; @@ -24,6 +25,7 @@ export interface DateTimePickerProps extends Omit, 'va onDayCreate?: flatpickr.Options.Hook; value?: string | Date | number | ReadonlyArray; className?: string; + render?: (props: Omit, ref: (node: HTMLInputElement) => void) => ReactElement; } export default class DatePicker extends Component {} diff --git a/types/react-flatpickr/react-flatpickr-tests.tsx b/types/react-flatpickr/react-flatpickr-tests.tsx index cbad38fd58..1806e4e49e 100644 --- a/types/react-flatpickr/react-flatpickr-tests.tsx +++ b/types/react-flatpickr/react-flatpickr-tests.tsx @@ -42,5 +42,8 @@ const valueDateArrayElement = ( const valueNumberArrayElement = ( ); +const customRender = ( + } /> +); const extraInputPropertiesElement = ;