Skip to content

Move function working incorrectly #1516

@serdariset

Description

@serdariset

I have prepared a component in monthly view. When I click on any day, I open a modal and show it in weekly view. I send the date of the day I clicked on the modal calendar as a prop. When I click on weekdays in June from the calendar, it focuses on the previous week. It works properly in other months and weekends.

// Both usage 
    <v-calendar
      borderless
      expanded
      title-position="left"
      :attributes="attributes"
      :locale="locale"
      @dayclick="onDayClick"
     view="weekly" //on modal
    >


// ClaendarModal.vue
onMounted(async () => {
  const date: Date = modal.Data || (new Date())
  await nextTick()

  if (calendar.value) {
    await calendar.value?.focusDate(date)
    await calendar.value?.move(date)
  }
})

//CalendarWidget.vue
const onDayClick = (date: CalendarDay) => {
  modal.value = {
    Display: true,
    Data: new Date(date.date)
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions