From 8d2de7b728190df26da03bf124eeb909c9bd8388 Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Tue, 20 Feb 2024 07:16:07 +0000 Subject: [PATCH] fix(nc-gui): month view edge case --- .../smartsheet/calendar/MonthView.vue | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/calendar/MonthView.vue b/packages/nc-gui/components/smartsheet/calendar/MonthView.vue index f0f53a545f..ecaecaae6b 100644 --- a/packages/nc-gui/components/smartsheet/calendar/MonthView.vue +++ b/packages/nc-gui/components/smartsheet/calendar/MonthView.vue @@ -167,7 +167,7 @@ const recordsToDisplay = computed<{ let currentWeekStart = startDate.startOf('week') const id = record.rowMeta.id ?? getRandomNumbers() - while (currentWeekStart.isBefore(endDate)) { + while (currentWeekStart.isSameOrBefore(endDate)) { const currentWeekEnd = currentWeekStart.endOf('week') const recordStart = currentWeekStart.isBefore(startDate) ? startDate : currentWeekStart const recordEnd = currentWeekEnd.isAfter(endDate) ? endDate : currentWeekEnd @@ -596,7 +596,7 @@ const isDateSelected = (date: Date) => { 'border-brand-500 border-2': isDateSelected(day), '!text-gray-400': !isDayInPagedMonth(day), }" - class="text-right relative group py-1 text-sm h-full border-1 bg-white border-gray-200 font-semibold hover:bg-gray-50 text-gray-800" + class="text-right relative group text-sm h-full border-1 bg-white border-gray-200 font-semibold hover:bg-gray-50 text-gray-800" @click="selectDate(day)" >
@@ -617,21 +617,11 @@ const isDateSelected = (date: Date) => { class="!group-hover:block" size="small" type="secondary" - @click=" - () => { - const record = { - row: { - [calendarRange[0].fk_from_col.title]: dayjs(day).format('YYYY-MM-DD'), - }, - } - emit('new-record', record) - } - " >