From 428c05f62a2098a698837e528c76ba60daa0077e Mon Sep 17 00:00:00 2001 From: Chris Heinz Date: Thu, 10 Oct 2024 10:20:57 +0200 Subject: [PATCH] fix: change default fallback value to undefined --- .../dates/src/components/DateTimePicker/DateTimePicker.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@mantine/dates/src/components/DateTimePicker/DateTimePicker.tsx b/packages/@mantine/dates/src/components/DateTimePicker/DateTimePicker.tsx index 0947faf8a5c..94539e930c5 100644 --- a/packages/@mantine/dates/src/components/DateTimePicker/DateTimePicker.tsx +++ b/packages/@mantine/dates/src/components/DateTimePicker/DateTimePicker.tsx @@ -142,7 +142,7 @@ export const DateTimePicker = factory((_props, ref) => { }); const formatTime = (dateValue: Date) => - dateValue ? dayjs(dateValue).format(withSeconds ? 'HH:mm:ss' : 'HH:mm') : ''; + dateValue ? dayjs(dateValue).format(withSeconds ? 'HH:mm:ss' : 'HH:mm') : undefined; const [timeValue, setTimeValue] = useState(formatTime(_value!)); const [currentLevel, setCurrentLevel] = useState(level || defaultLevel || 'month');