From 5320138eb95adeae92cef6da810b67fdb7bb7e26 Mon Sep 17 00:00:00 2001 From: Ishan Uniyal Date: Fri, 13 Mar 2026 13:01:21 +0530 Subject: [PATCH] fix: added event propogation on enter press --- .../src/components/CustomTimePicker/CustomTimePicker.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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);