Skip to content

Commit 4d2a37f

Browse files
authored
fix: ant-piker-cell-range-hover-end style error (#6373)
* fix: ant-piker-cell-range-hover-end style error * feat: be consistent with antd * feat: be consistent with antd
1 parent dcc3bb1 commit 4d2a37f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

components/date-picker/style/index.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,9 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
331331
} = token;
332332

333333
const pickerPanelWidth = pickerPanelCellWidth * 7 + paddingSM * 2 + 4;
334+
334335
const hoverCellFixedDistance =
335-
(pickerPanelWidth - paddingXS * 2) / 3 - pickerYearMonthCellWidth / 2;
336+
(pickerPanelWidth - paddingXS * 2) / 3 - pickerYearMonthCellWidth - paddingSM;
336337

337338
return {
338339
[componentCls]: {
@@ -658,17 +659,17 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
658659
insetInlineEnd: hoverCellFixedDistance,
659660
borderInlineEnd: `${lineWidth}px dashed ${pickerDateHoverRangeBorderColor}`,
660661
borderStartStartRadius: 0,
661-
borderBottomStartRadius: 0,
662+
borderEndStartRadius: 0,
662663
borderStartEndRadius: borderRadius,
663-
borderBottomEndRadius: borderRadius,
664+
borderEndEndRadius: borderRadius,
664665

665666
[`${componentCls}-panel-rtl &`]: {
666667
insetInlineStart: hoverCellFixedDistance,
667668
borderInlineStart: `${lineWidth}px dashed ${pickerDateHoverRangeBorderColor}`,
668669
borderStartStartRadius: borderRadius,
669-
borderBottomStartRadius: borderRadius,
670+
borderEndStartRadius: borderRadius,
670671
borderStartEndRadius: 0,
671-
borderBottomEndRadius: 0,
672+
borderEndEndRadius: 0,
672673
},
673674
},
674675
},
@@ -1429,6 +1430,7 @@ export default genComponentStyleHook(
14291430
initInputToken<FullToken<'DatePicker'>>(token),
14301431
initPickerPanelToken(token),
14311432
);
1433+
14321434
return [
14331435
genPickerStyle(pickerToken),
14341436
genPickerStatusStyle(pickerToken),

0 commit comments

Comments
 (0)