diff --git a/backend/src/routes/schedules/index.js b/backend/src/routes/schedules/index.js
index 7af35e1..36fa758 100644
--- a/backend/src/routes/schedules/index.js
+++ b/backend/src/routes/schedules/index.js
@@ -327,6 +327,11 @@ async function handleMonthlySchedules(db, year, month) {
// 생일 일정 추가
for (const member of birthdays) {
const birthDate = new Date(member.birth_date);
+ const birthYear = birthDate.getFullYear();
+
+ // 조회 연도가 생년보다 이전이면 스킵
+ if (year < birthYear) continue;
+
const birthdayThisYear = new Date(year, birthDate.getMonth(), birthDate.getDate());
const dateKey = birthdayThisYear.toISOString().split('T')[0];
diff --git a/frontend/src/components/admin/CustomDatePicker.jsx b/frontend/src/components/admin/CustomDatePicker.jsx
index 98abb0c..e4524b7 100644
--- a/frontend/src/components/admin/CustomDatePicker.jsx
+++ b/frontend/src/components/admin/CustomDatePicker.jsx
@@ -40,13 +40,15 @@ function CustomDatePicker({ value, onChange, placeholder = '날짜 선택', show
days.push(i);
}
- const startYear = Math.floor(year / 10) * 10 - 1;
+ const MIN_YEAR = 2025;
+ const startYear = Math.max(MIN_YEAR, Math.floor(year / 12) * 12 - 1);
const years = Array.from({ length: 12 }, (_, i) => startYear + i);
+ const canGoPrevYearRange = startYear > MIN_YEAR;
const prevMonth = () => setViewDate(new Date(year, month - 1, 1));
const nextMonth = () => setViewDate(new Date(year, month + 1, 1));
- const prevYearRange = () => setViewDate(new Date(year - 10, month, 1));
- const nextYearRange = () => setViewDate(new Date(year + 10, month, 1));
+ const prevYearRange = () => canGoPrevYearRange && setViewDate(new Date(Math.max(MIN_YEAR, year - 12), month, 1));
+ const nextYearRange = () => setViewDate(new Date(year + 12, month, 1));
const selectDate = (day) => {
const dateStr = `${year}-${String(month + 1).padStart(2, '0')}-${String(day).padStart(2, '0')}`;
@@ -57,7 +59,6 @@ function CustomDatePicker({ value, onChange, placeholder = '날짜 선택', show
const selectYear = (y) => {
setViewDate(new Date(y, month, 1));
- setViewMode('months');
};
const selectMonth = (m) => {
@@ -124,7 +125,8 @@ function CustomDatePicker({ value, onChange, placeholder = '날짜 선택', show
diff --git a/frontend/src/pages/mobile/public/Schedule.jsx b/frontend/src/pages/mobile/public/Schedule.jsx
index fc55c09..09e9d3c 100644
--- a/frontend/src/pages/mobile/public/Schedule.jsx
+++ b/frontend/src/pages/mobile/public/Schedule.jsx
@@ -1239,8 +1239,10 @@ function CalendarPicker({
}
};
- const [yearRangeStart, setYearRangeStart] = useState(Math.floor(year / 12) * 12);
+ const MIN_YEAR = 2025;
+ const [yearRangeStart, setYearRangeStart] = useState(MIN_YEAR);
const yearRange = Array.from({ length: 12 }, (_, i) => yearRangeStart + i);
+ const canGoPrevYearRange = yearRangeStart > MIN_YEAR;
// 배경 스크롤 막기
useEffect(() => {
@@ -1364,16 +1366,17 @@ function CalendarPicker({
>
{/* 년도 범위 헤더 */}
-