diff --git a/src/components/common/CalendarModal.tsx b/src/components/common/CalendarModal.tsx index 82cf4e19b..bcaa79af0 100644 --- a/src/components/common/CalendarModal.tsx +++ b/src/components/common/CalendarModal.tsx @@ -130,6 +130,10 @@ const CalendarModal: FC = ({ buildCalendarGrid(currentYear, currentMonth) ), [currentMonth, currentYear]); + const submitLabel = useMemo(() => { + return submitButtonLabel || formatSubmitLabel(lang, selectedDate); + }, [lang, selectedDate, submitButtonLabel]); + function handlePrevMonth() { setCurrentMonthAndYear((d) => { const dateCopy = new Date(d); @@ -312,7 +316,7 @@ const CalendarModal: FC = ({
{secondButtonLabel && (