I am struggling to implement hover functionality in the categories view of Vuetify calendar within the body section (slot day-body
). When I try to add hover functionality, the entire row ends up being affected by the hover effect, even though I only want it on a single category. The week, day, and 4-day views are working correctly since I can easily access date
, week
, and timeToY
from the day-body
slot.
<template v-slot:day-body="{ date, timeToY }">
<div :class="{ hover: isHover && date === hoverDate }"
:style="{ top: `${timeToY(hoverY)}px` }">
<p class="mt-2 ml-2">{{ hoverY }}</p>
</div>
</template>
This HTML snippet includes the usage of the following two events:
@mousemove:time="hoverToSeeTime"
and @mouseleave:time="removeHover"
. In the mousemove handler, I set values for isHover
, hoverDate
, and hoverY
. However, I am finding it difficult to make individual category tiles hoverable because the day-body
slot does not contain a category key. Is there something crucial that I am overlooking?
Thank you in advance.