From ac0037a0daed862241c126c35c8def2d998c9280 Mon Sep 17 00:00:00 2001 From: Shubham Saurabh Date: Mon, 25 Mar 2024 14:32:03 +0530 Subject: [PATCH] Fix #6151: fixed maxDate prop validation issue (#6214) Co-authored-by: Shubham Saurabh --- components/lib/calendar/Calendar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/calendar/Calendar.js b/components/lib/calendar/Calendar.js index 311cc3e2fc..62a4ab8557 100644 --- a/components/lib/calendar/Calendar.js +++ b/components/lib/calendar/Calendar.js @@ -809,7 +809,7 @@ export const Calendar = React.memo( const currentHour = currentTime.getHours(); const newHour = currentHour >= 12 ? currentHour - 12 : currentHour + 12; - if (validateHour(convertTo24Hour(newHour, !(currentHour > 11)), currentTime)) { + if (validateHour(convertTo24Hour(newHour, currentHour > 11), currentTime)) { updateTime(event, newHour, currentTime.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds()); }