Skip to content

Commit

Permalink
fix: datepicker arrow error
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Jun 7, 2022
1 parent e907ffd commit 71c6195
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/vc-picker/RangePicker.tsx
Expand Up @@ -986,7 +986,6 @@ function RangerPicker<DateType>() {
) {
// Arrow offset
arrowLeft = startInputDivRef.value.offsetWidth + separatorRef.value.offsetWidth;

if (
panelDivRef.value.offsetWidth &&
arrowRef.value.offsetWidth &&
Expand All @@ -1001,7 +1000,8 @@ function RangerPicker<DateType>() {
}
}

const arrowPositionStyle = direction === 'rtl' ? { right: arrowLeft } : { left: arrowLeft };
const arrowPositionStyle =
direction === 'rtl' ? { right: `${arrowLeft}px` } : { left: `${arrowLeft}px` };

function renderPanels() {
let panels: VueNode;
Expand Down Expand Up @@ -1092,7 +1092,7 @@ function RangerPicker<DateType>() {
return (
<div
class={`${prefixCls}-panel-container`}
style={{ marginLeft: panelLeft }}
style={{ marginLeft: `${panelLeft}px` }}
ref={panelDivRef}
onMousedown={e => {
e.preventDefault();
Expand Down

0 comments on commit 71c6195

Please sign in to comment.