diff --git a/react-input-calendar/react-input-calendar.d.ts b/react-input-calendar/react-input-calendar.d.ts index d8c518b83..bd2da99e8 100644 --- a/react-input-calendar/react-input-calendar.d.ts +++ b/react-input-calendar/react-input-calendar.d.ts @@ -32,13 +32,17 @@ declare module reactInputCalendar { */ computableFormat?: string; /** - * Set an function that will be triggered whenever there is a change in the selected date. It will return the date in the props.computableFormat format. + * Set a function that will be triggered whenever there is a change in the selected date. It will return the date in the props.computableFormat format. */ - onChange?:(selectedDate: string)=>any; + onChange?: (computableDate: string) => void; + /** + * Set a function that will be triggered the when input field is blurred. It will return the event and the date in the props.computableFormat format. + */ + onBlur?: (event: __React.SyntheticEvent, computableDate: string) => void; /** * Define state when date picker would close once the user has clicked on a date. */ - closeOnSelect?:boolean; + closeOnSelect?: boolean; /** * Setting this value to true makes the calendar widget open when the iput field is focused. */ @@ -46,14 +50,18 @@ declare module reactInputCalendar { /** * Value to show in the input text box if no date is set. */ - placeholder?:string + placeholder?: string; + /** + * Id that should be applied to the input field. Useful when using it with a label element. + */ + inputFieldId?: string; } interface ReactInputCalendarState { } - export class ReactInputCalendar extends __React.Component{ - render(): __React.DOMElement + export class ReactInputCalendar extends __React.Component { + render(): __React.DOMElement; } } declare var ReactInputCalendar: typeof reactInputCalendar.ReactInputCalendar declare module "react-input-calendar" { - export = ReactInputCalendar + export = ReactInputCalendar; }