From b1eb622a0e836f889be390246acc6e98f1c506f3 Mon Sep 17 00:00:00 2001 From: Batuhan Tomo Date: Tue, 30 Apr 2024 16:03:53 +0300 Subject: [PATCH] Fix #6512: fix unexpected type coercion and removed unused code --- components/lib/calendar/Calendar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lib/calendar/Calendar.js b/components/lib/calendar/Calendar.js index 7cebdb986b..d4c8b630c0 100644 --- a/components/lib/calendar/Calendar.js +++ b/components/lib/calendar/Calendar.js @@ -880,7 +880,7 @@ export const Calendar = React.memo( }; const convertTo24Hour = (hour, pm) => { - if (props.hourFormat == '12') { + if (props.hourFormat === '12') { return hour === 12 ? (pm ? 12 : 0) : pm ? hour + 12 : hour; } @@ -1608,7 +1608,7 @@ export const Calendar = React.memo( if (isMultipleSelection()) { if (isSelected(dateMeta)) { - let value = props.value.filter((date, i) => { + let value = props.value.filter((date) => { return !isDateEquals(date, dateMeta); });