Skip to content

Commit

Permalink
fix: change default fallback value to undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuzart committed Oct 10, 2024
1 parent e0721af commit 428c05f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const DateTimePicker = factory<DateTimePickerFactory>((_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');
Expand Down

0 comments on commit 428c05f

Please sign in to comment.