diff --git a/frontend/src/components/CustomTimePicker/CustomTimePicker.tsx b/frontend/src/components/CustomTimePicker/CustomTimePicker.tsx index 008f63357f..3c449ee11a 100644 --- a/frontend/src/components/CustomTimePicker/CustomTimePicker.tsx +++ b/frontend/src/components/CustomTimePicker/CustomTimePicker.tsx @@ -297,7 +297,12 @@ function CustomTimePicker({ resetErrorStatus(); }; - const handleInputPressEnter = (): void => { + const handleInputPressEnter = ( + event?: React.KeyboardEvent, + ): void => { + event?.preventDefault(); + event?.stopPropagation(); + // check if the entered time is in the format of 1m, 2h, 3d, 4w const isTimeDurationShortHandFormat = /^(\d+)([mhdw])$/.test(inputValue);