Skip to content

Commit 71c6195

Browse files
committed
fix: datepicker arrow error
1 parent e907ffd commit 71c6195

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/vc-picker/RangePicker.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,6 @@ function RangerPicker<DateType>() {
986986
) {
987987
// Arrow offset
988988
arrowLeft = startInputDivRef.value.offsetWidth + separatorRef.value.offsetWidth;
989-
990989
if (
991990
panelDivRef.value.offsetWidth &&
992991
arrowRef.value.offsetWidth &&
@@ -1001,7 +1000,8 @@ function RangerPicker<DateType>() {
10011000
}
10021001
}
10031002

1004-
const arrowPositionStyle = direction === 'rtl' ? { right: arrowLeft } : { left: arrowLeft };
1003+
const arrowPositionStyle =
1004+
direction === 'rtl' ? { right: `${arrowLeft}px` } : { left: `${arrowLeft}px` };
10051005

10061006
function renderPanels() {
10071007
let panels: VueNode;
@@ -1092,7 +1092,7 @@ function RangerPicker<DateType>() {
10921092
return (
10931093
<div
10941094
class={`${prefixCls}-panel-container`}
1095-
style={{ marginLeft: panelLeft }}
1095+
style={{ marginLeft: `${panelLeft}px` }}
10961096
ref={panelDivRef}
10971097
onMousedown={e => {
10981098
e.preventDefault();

0 commit comments

Comments
 (0)