diff --git a/packages/nc-gui/components/smartsheet/calendar/MonthView.vue b/packages/nc-gui/components/smartsheet/calendar/MonthView.vue
index d3a3e5d17b..b34a7fbc81 100644
--- a/packages/nc-gui/components/smartsheet/calendar/MonthView.vue
+++ b/packages/nc-gui/components/smartsheet/calendar/MonthView.vue
@@ -6,8 +6,16 @@ import type { Row } from '#imports'
const emit = defineEmits(['new-record', 'expandRecord'])
-const { selectedDate, selectedMonth, formattedData, formattedSideBarData, displayField, calendarRange, updateRowProperty } =
- useCalendarViewStoreOrThrow()
+const {
+ selectedDate,
+ selectedMonth,
+ formattedData,
+ formattedSideBarData,
+ sideBarFilterOption,
+ displayField,
+ calendarRange,
+ updateRowProperty,
+} = useCalendarViewStoreOrThrow()
const isMondayFirst = ref(true)
@@ -668,6 +676,11 @@ const selectDate = (date: Date) => {
selectedDate.value = date
}
+const viewMore = (date: Date) => {
+ sideBarFilterOption.value = 'selectedDate' as const
+ selectedDate.value = date
+}
+
const isDateSelected = (date: Date) => {
if (!selectedDate.value) return false
return dayjs(date).isSame(selectedDate.value, 'day')
@@ -794,16 +807,19 @@ onBeforeUnmount(() => {
{{ dayjs(day).format('DD') }}
-
- + {{ recordsToDisplay.count[dayjs(day).format('YYYY-MM-DD')]?.overflowCount }} more
-
+ + {{ recordsToDisplay.count[dayjs(day).format('YYYY-MM-DD')]?.overflowCount }} more
+
diff --git a/packages/nc-gui/composables/useCalendarViewStore.ts b/packages/nc-gui/composables/useCalendarViewStore.ts
index 52b4c1b668..31ecbd1ae9 100644
--- a/packages/nc-gui/composables/useCalendarViewStore.ts
+++ b/packages/nc-gui/composables/useCalendarViewStore.ts
@@ -151,8 +151,8 @@ const [useProvideCalendarViewStore, useCalendarViewStore] = useInjectionState(
switch (sideBarFilterOption.value) {
case 'day':
- fromDate = dayjs(selectedDate.value)
- toDate = dayjs(selectedDate.value)
+ fromDate = dayjs(selectedDate.value).startOf('day')
+ toDate = dayjs(selectedDate.value).endOf('day')
break
case 'week':
fromDate = dayjs(selectedDateRange.value.start).startOf('day')
@@ -164,7 +164,7 @@ const [useProvideCalendarViewStore, useCalendarViewStore] = useInjectionState(
const daysToDisplay = Math.max(endOfMonth.diff(startOfMonth, 'day') + 1, 35)
fromDate = startOfMonth.subtract((startOfMonth.day() + 7) % 7, 'day').add(1, 'day')
- toDate = fromDate.add(daysToDisplay, 'day')
+ toDate = fromDate.add(daysToDisplay, 'day').endOf('day')
break
}
case 'year':