From 8af27abc2b0103fdf0d50cc0e711bc2a8ff870ba Mon Sep 17 00:00:00 2001 From: Ken Lai Date: Wed, 22 Apr 2020 18:14:29 +0800 Subject: [PATCH] Update typings --- DateTime.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/DateTime.d.ts b/DateTime.d.ts index a169f016c..cd5ef9519 100644 --- a/DateTime.d.ts +++ b/DateTime.d.ts @@ -130,6 +130,13 @@ declare namespace ReactDatetimeClass { and should return a true or false whether the currentDate is valid or not. See selectable dates. */ isValidDate?: (currentDate: any, selectedDate: any) => boolean; + /* + Replace the rendering of the input element. The function has the following arguments: + the default calculated props for the input, openCalendar (a function which opens the calendar) + and closeCalendar (a function which closes the calendar). Must return a React component or null. + See Customize the Input Appearance. + */ + renderInput?: (props: any, openCalendar: Function, closeCalendar: Function) => JSX.Element; /* Customize the way that the days are shown in the day picker. The accepted function has the selectedDate, the current date and the default calculated props for the cell,