You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -42,8 +42,8 @@ API
42
42
|**timeFormat**|`bool` or `string`|`true`| Defines the format for the time. It accepts any [moment.js time format](http://momentjs.com/docs/#/displaying/format/). If `true` the time will be displayed using the defaults for the current locale. If `false` the timepicker is disabled and the component can be used as datepicker. |
43
43
|**input**| boolean | true | Wether to show an input field to edit the date manually. |
44
44
| **locale** | string | null | Manually set the locale for the react-datetime instance. Moment.js locale needs to be loaded to be used, see [i18n docs](#i18n).
45
-
|**onChange**| function | empty function | Callback trigger when the date changes. The callback receives the selected `moment` object as only parameter. |
46
-
|**onBlur**| function | empty function | Callback trigger for when the user clicks outside of the input, simulating a regular onBlur. The callback receives the selected `moment` object as only parameter. |
45
+
|**onChange**| function | empty function | Callback trigger when the date changes. The callback receives the selected `moment` object as only parameter, if the date in the input is valid. If it isn't, the value of the input (a string) is returned. |
46
+
|**onBlur**| function | empty function | Callback trigger for when the user clicks outside of the input, simulating a regular onBlur. The callback receives the selected `moment` object as only parameter, if the date in the input is valid. If it isn't, the value of the input (a string) is returned. |
47
47
|**viewMode**| string or number | 'days' | The default view to display when the picker is shown. ('years', 'months', 'days', 'time') |
48
48
|**className**| string |`""`| Extra class names for the component markup. |
49
49
|**inputProps**| object | undefined | Defines additional attributes for the input element of the component. |
0 commit comments