Skip to content

Commit 3504cd0

Browse files
authored
Merge pull request #923 from allusernamestakenexceptthis/bugfix/fix_arrow_not_correct_on_right
fix: Arrow not positioned correctly when the field at the most right
2 parents e797f8b + 8dc6d02 commit 3504cd0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/VueDatePicker/components/DatepickerMenu.vue

+2
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@
251251
const inputRect = props.getInputRect();
252252
if (inputRect?.width < calendarWidth?.value && inputRect?.left <= (menuRect?.left ?? 0)) {
253253
return `${inputRect?.width / 2}px`;
254+
} else if (inputRect?.right >= (menuRect?.right ?? 0) && inputRect?.width < calendarWidth?.value) {
255+
return `${calendarWidth?.value - inputRect?.width / 2}px`;
254256
}
255257
return '50%';
256258
});

0 commit comments

Comments
 (0)