Skip to content

Commit f631472

Browse files
KelseyKelsey
Kelsey
authored and
Kelsey
committed
Adding renderInput to typescript definition
1 parent d40f6d8 commit f631472

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

DateTime.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,14 @@ declare namespace ReactDatetimeClass {
145145
See appearance customization
146146
*/
147147
renderYear?: (props: any, year: number, selectedDate: any) => JSX.Element;
148+
/*
149+
Customize the way that the Input is shown.
150+
The accepted function has openCalendar (a function which opens the calendar),
151+
closeCalendar (a function which closes the calendar), and
152+
the default calculated props for the input. Must return a React component or null.
153+
See appearance customization
154+
*/
155+
renderInput?: (props: any, openCalendar: Function, closeCalendar: Function) => JSX.Element;
148156
/*
149157
Whether to use moment's strict parsing when parsing input.
150158
*/

0 commit comments

Comments
 (0)