Browse Source

feat(nc-gui): move to current Date

pull/7611/head
DarkPhoenix2704 9 months ago
parent
commit
0454ecd48d
  1. 18
      packages/nc-gui/components/smartsheet/calendar/index.vue

18
packages/nc-gui/components/smartsheet/calendar/index.vue

@ -46,6 +46,7 @@ const {
loadCalendarData,
isCalendarDataLoading,
selectedDate,
pageDate,
selectedDateRange,
activeCalendarView,
paginateCalendarView,
@ -149,6 +150,23 @@ const headerText = computed(() => {
<NcButton size="small" type="secondary" @click="paginateCalendarView('next')">
<component :is="iconMap.doubleRightArrow" class="h-4 w-4" />
</NcButton>
<NcButton
v-if="!isMobileMode"
size="small"
type="secondary"
@click="
() => {
selectedDate = new Date()
pageDate = new Date()
selectedDateRange = {
start: dayjs(new Date()).startOf('week').toDate(),
end: dayjs(new Date()).endOf('week').toDate(),
}
}
"
>
Go to Today
</NcButton>
</div>
<NcButton v-if="!isMobileMode" size="small" type="secondary" @click="showSideMenu = !showSideMenu">
<component :is="iconMap.sidebar" class="h-4 w-4 text-gray-700 transition-all" />

Loading…
Cancel
Save