diff --git a/frontend/src/views/teachOffice/shiftSemester/TeachingAllocationDialog.vue b/frontend/src/views/teachOffice/shiftSemester/TeachingAllocationDialog.vue index 565d36e9a..012330faf 100644 --- a/frontend/src/views/teachOffice/shiftSemester/TeachingAllocationDialog.vue +++ b/frontend/src/views/teachOffice/shiftSemester/TeachingAllocationDialog.vue @@ -407,7 +407,8 @@ export default { } }, isMonthStart(w) { - return w.startDate.getDate() <= 7 + const d = new Date(String(w.startDate).replace(/-/g, '/')) + return !isNaN(d) && d.getDate() <= 7 }, shortDate(dateStr) { return dateStr ? String(dateStr).slice(5) : '' diff --git a/frontend/src/views/teachOffice/shiftSemester/index.vue b/frontend/src/views/teachOffice/shiftSemester/index.vue index f0969b641..fbf7a42f5 100644 --- a/frontend/src/views/teachOffice/shiftSemester/index.vue +++ b/frontend/src/views/teachOffice/shiftSemester/index.vue @@ -51,19 +51,19 @@