diff --git a/src/components/DatePicker.tsx b/src/components/DatePicker.tsx index 766d410d3..7f2f68a09 100644 --- a/src/components/DatePicker.tsx +++ b/src/components/DatePicker.tsx @@ -371,7 +371,8 @@ export class DatePicker extends React.Component { value: normalizeValue(props.value, props.format) }; - newState.inputValue = newState.value.format(this.props.inputFormat) || ''; + newState.inputValue = + newState.value?.format(this.props.inputFormat) || ''; this.setState(newState); }