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
pull/6382/head
Cherry7 2023-03-21 14:08:37 +08:00 committed by GitHub
parent dcc3bb10cb
commit 4d2a37fcd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 5 deletions

View File

@ -331,8 +331,9 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
} = token;
const pickerPanelWidth = pickerPanelCellWidth * 7 + paddingSM * 2 + 4;
const hoverCellFixedDistance =
(pickerPanelWidth - paddingXS * 2) / 3 - pickerYearMonthCellWidth / 2;
(pickerPanelWidth - paddingXS * 2) / 3 - pickerYearMonthCellWidth - paddingSM;
return {
[componentCls]: {
@ -658,17 +659,17 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
insetInlineEnd: hoverCellFixedDistance,
borderInlineEnd: `${lineWidth}px dashed ${pickerDateHoverRangeBorderColor}`,
borderStartStartRadius: 0,
borderBottomStartRadius: 0,
borderEndStartRadius: 0,
borderStartEndRadius: borderRadius,
borderBottomEndRadius: borderRadius,
borderEndEndRadius: borderRadius,
[`${componentCls}-panel-rtl &`]: {
insetInlineStart: hoverCellFixedDistance,
borderInlineStart: `${lineWidth}px dashed ${pickerDateHoverRangeBorderColor}`,
borderStartStartRadius: borderRadius,
borderBottomStartRadius: borderRadius,
borderEndStartRadius: borderRadius,
borderStartEndRadius: 0,
borderBottomEndRadius: 0,
borderEndEndRadius: 0,
},
},
},
@ -1429,6 +1430,7 @@ export default genComponentStyleHook(
initInputToken<FullToken<'DatePicker'>>(token),
initPickerPanelToken(token),
);
return [
genPickerStyle(pickerToken),
genPickerStatusStyle(pickerToken),