Browse Source

fix(nc-gui): week view dates array is empty in some cases

pull/7611/head
DarkPhoenix2704 9 months ago
parent
commit
ae74f7be10
  1. 2
      packages/nc-gui/components/smartsheet/calendar/WeekView.vue

2
packages/nc-gui/components/smartsheet/calendar/WeekView.vue

@ -15,7 +15,7 @@ const weekDates = computed(() => {
const startOfWeek = new Date(selectedDateRange.value.start)
const endOfWeek = new Date(selectedDateRange.value.end)
const datesArray = []
while (startOfWeek.getDate() <= endOfWeek.getDate()) {
while (startOfWeek.getTime() <= endOfWeek.getTime()) {
datesArray.push(new Date(startOfWeek))
startOfWeek.setDate(startOfWeek.getDate() + 1)
}

Loading…
Cancel
Save