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
|**date**| Date | new Date() | Represents the inital dateTime, this prop is parsed by moment.js, so it is possible to use a date string. |
35
-
|**dateFormat**| string |Locale default | Defines the format moment.js should use to parse and output the date. The default is only set if there is not `timeFormat` defined. |
36
-
|**timeFormat**| string |Locale default | Defines the format moment.js should use to parse and output the time. The default is only set if there is not `dateFormat` defined. |
35
+
|**dateFormat**|`bool` or `string`|`true`| Defines the format for the date. It accepts any [moment.js date format](http://momentjs.com/docs/#/displaying/format/). If `true` the date will be displayed using the defaults for the current locale. If `false` the datepicker is disabled and the component can be used as timepicker. |
36
+
|**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. |
37
37
|**input**| boolean | true | Wether to show an input field to edit the date manually. |
38
38
| **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).
39
39
|**onChange**| function | empty function | Callback trigger when the date changes. The callback receives the selected `moment` object as only parameter. |
0 commit comments