Skip to content

Commit 337ce14

Browse files
committed
refactor: Trigger customPosition on marker only if tooltip is provided
1 parent e73beb2 commit 337ce14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/VueDatePicker/components/DatePicker/DpCalendar.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@
261261
const handleTooltip = async (day: UnwrapRef<ICalendarDay>, weekInd: number, dayInd: number) => {
262262
const el = unrefElement(dayRefs.value[weekInd][dayInd]);
263263
if (el) {
264-
if (day.marker?.customPosition) {
264+
if (day.marker?.customPosition && day.marker?.tooltip?.length) {
265265
markerTooltipStyle.value = day.marker.customPosition(el);
266266
} else {
267267
const { width, height } = el.getBoundingClientRect();

0 commit comments

Comments
 (0)