From 7ffc1b9fae91af576c20742a26f798307d0bc681 Mon Sep 17 00:00:00 2001 From: shubham-praj Date: Wed, 4 Oct 2023 01:11:22 +0530 Subject: [PATCH] max duration issue fix --- src/components/GoalsComponents/GoalConfigModal/ConfigGoal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/GoalsComponents/GoalConfigModal/ConfigGoal.tsx b/src/components/GoalsComponents/GoalConfigModal/ConfigGoal.tsx index efa65961e..64913f485 100644 --- a/src/components/GoalsComponents/GoalConfigModal/ConfigGoal.tsx +++ b/src/components/GoalsComponents/GoalConfigModal/ConfigGoal.tsx @@ -39,7 +39,7 @@ const CustomInput: React.FC = ({ placeholder, value, handleCh ); const roundOffHours = (hrsValue: string) => { - return hrsValue === "" ? "" : String(Math.max(Math.round(Number(hrsValue)), 0)); + return hrsValue === "" ? "" : String(Math.min(Math.max(Math.round(Number(hrsValue)), 0), 99)); }; const ConfigGoal = ({ goal, action }: { action: "Update" | "Create"; goal: GoalItem }) => {