Skip to content

Commit

Permalink
refactor: Trigger customPosition on marker only if tooltip is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasenkoo committed Jul 14, 2024
1 parent e73beb2 commit 337ce14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/VueDatePicker/components/DatePicker/DpCalendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@
const handleTooltip = async (day: UnwrapRef<ICalendarDay>, weekInd: number, dayInd: number) => {
const el = unrefElement(dayRefs.value[weekInd][dayInd]);
if (el) {
if (day.marker?.customPosition) {
if (day.marker?.customPosition && day.marker?.tooltip?.length) {
markerTooltipStyle.value = day.marker.customPosition(el);
} else {
const { width, height } = el.getBoundingClientRect();
Expand Down

0 comments on commit 337ce14

Please sign in to comment.