diff --git a/packages/react-core/src/components/DatePicker/DatePicker.tsx b/packages/react-core/src/components/DatePicker/DatePicker.tsx index 8aebe13f21f..9626eaaa171 100644 --- a/packages/react-core/src/components/DatePicker/DatePicker.tsx +++ b/packages/react-core/src/components/DatePicker/DatePicker.tsx @@ -98,7 +98,7 @@ const DatePickerBase = ( className, locale = undefined, dateFormat = yyyyMMddFormat, - dateParse = (val: string) => val.split('-').length === 3 && new Date(`${val}T00:00:00`), + dateParse = (val: string) => (val.split('-').length === 3 ? new Date(`${val}T00:00:00`) : new Date(undefined)), isDisabled = false, placeholder = 'YYYY-MM-DD', value: valueProp = '', @@ -230,7 +230,7 @@ const DatePickerBase = ( return (