Skip to content

Commit 48ca002

Browse files
authored
fix: add marginLeft of arrow into position calculation (#350)
* fix: add marginLeft of arrow into position calculation * fix: replace default
1 parent 55854d6 commit 48ca002

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/RangePicker.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,10 @@ function InnerRangePicker<DateType>(props: RangePickerProps<DateType>) {
896896
if (
897897
panelDivRef.current.offsetWidth &&
898898
arrowRef.current.offsetWidth &&
899-
arrowLeft > panelDivRef.current.offsetWidth - arrowRef.current.offsetWidth
899+
arrowLeft >
900+
panelDivRef.current.offsetWidth -
901+
arrowRef.current.offsetWidth -
902+
parseInt(arrowRef.current.style?.marginLeft || '0')
900903
) {
901904
panelLeft = arrowLeft;
902905
}

0 commit comments

Comments
 (0)