Skip to content

Commit

Permalink
fix(VCalendar): using date adapter to create new date
Browse files Browse the repository at this point in the history
  • Loading branch information
SonTT19 committed May 16, 2024
1 parent 3363612 commit 10a71b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vuetify/src/labs/VCalendar/VCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const VCalendar = genericComponent<VCalendarSlots>()({
}

function onClickToday () {
model.value = [new Date()]
model.value = [adapter.date()]
}

const title = computed(() => {
Expand Down Expand Up @@ -149,7 +149,7 @@ export const VCalendar = genericComponent<VCalendarSlots>()({
!props.hideWeekNumber ? <div class="v-calendar-month__weeknumber">{ weekNumbers.value[wi] }</div> : '',
week.map(day => (
<VCalendarMonthDay
color={ adapter.isSameDay(new Date(), day.date) ? 'primary' : undefined }
color={ adapter.isSameDay(adapter.date(), day.date) ? 'primary' : undefined }
day={ day }
title={ day ? adapter.format(day.date, 'dayOfMonth') : 'NaN' }
events={ props.events?.filter(e => adapter.isSameDay(day.date, e.start) || adapter.isSameDay(day.date, e.end)) }
Expand Down

0 comments on commit 10a71b6

Please sign in to comment.