diff --git a/components/TempDesignSystem/Form/Date/index.tsx b/components/TempDesignSystem/Form/Date/index.tsx index d697cff34..3f56edcfb 100644 --- a/components/TempDesignSystem/Form/Date/index.tsx +++ b/components/TempDesignSystem/Form/Date/index.tsx @@ -56,7 +56,6 @@ export default function DateSelect({ name, registerOptions = {} }: DateProps) { .reverse() .map((year) => ({ value: year, label: year.toString() })) - // Get max days based on selected month/year const daysInMonth = selectedMonth !== null && selectedYear !== null ? dt(`${selectedYear}-${selectedMonth + 1}-01`).daysInMonth() @@ -82,8 +81,7 @@ export default function DateSelect({ name, registerOptions = {} }: DateProps) { * must subtract by 1 to get the selected month */ case DateName.month: - const monthZeroBased = value - 1 - newMonth = monthZeroBased + newMonth = value - 1 setSelectedMonth(newMonth) if (selectedDay) { const maxDays = dt(`${newYear}-${value}-01`).daysInMonth()