Skip to content

Commit

Permalink
fix(pastTimePicker): 固定时间范围选择时panel抖动 (#2158)
Browse files Browse the repository at this point in the history
Co-authored-by: YanHui <[email protected]>
  • Loading branch information
hiker90 and YanHui authored Jun 16, 2023
1 parent 413afb4 commit da81bc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/static-date-picker/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ const Cell: React.FC<{ visible: boolean; prefixCls: string; currentDate: Date }>
}
});

return (
return (visible &&
<div ref={divRef} className={`${prefixCls}-cell-inner`}>
{visible && currentDate.getDate()}
{currentDate.getDate()}
</div>
);
};
Expand Down
4 changes: 4 additions & 0 deletions src/static-date-picker/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@
&::before {
background: @gray-1;
}
&:empty::before {
background: transparent !important;
}
}
}

Expand All @@ -200,6 +203,7 @@
&-date-panel &-cell-inner {
height: 24px;
line-height: 24px;
overflow: hidden;
}

&-month-panel &-cell-inner,
Expand Down

0 comments on commit da81bc0

Please sign in to comment.