Skip to content

Commit 92bc772

Browse files
committed
fix: improve week header cell styling
1 parent abb12ba commit 92bc772

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

src/PickerPanel/DatePanel/index.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,8 @@ export default function DatePanel<DateType extends object = any>(props: DatePane
9999

100100
if (prefixColumn) {
101101
headerCells.push(
102-
<th key="empty">
103-
<span style={{ width: 0, height: 0, position: 'absolute', overflow: 'hidden', opacity: 0 }}>
104-
{locale.week}
105-
</span>
102+
<th key="empty" style={{ pointerEvents: 'none', opacity: 0 }}>
103+
{locale.week}
106104
</th>,
107105
);
108106
}

tests/__snapshots__/panel.spec.tsx.snap

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3395,12 +3395,10 @@ exports[`Picker.Panel append cell with cellRender in week 1`] = `
33953395
>
33963396
<thead>
33973397
<tr>
3398-
<th>
3399-
<span
3400-
style="width: 0px; height: 0px; position: absolute; overflow: hidden; opacity: 0;"
3401-
>
3402-
Week
3403-
</span>
3398+
<th
3399+
style="pointer-events: none; opacity: 0;"
3400+
>
3401+
Week
34043402
</th>
34053403
<th>
34063404
Su
@@ -6958,12 +6956,10 @@ exports[`Picker.Panel override cell with cellRender in week 1`] = `
69586956
>
69596957
<thead>
69606958
<tr>
6961-
<th>
6962-
<span
6963-
style="width: 0px; height: 0px; position: absolute; overflow: hidden; opacity: 0;"
6964-
>
6965-
Week
6966-
</span>
6959+
<th
6960+
style="pointer-events: none; opacity: 0;"
6961+
>
6962+
Week
69676963
</th>
69686964
<th>
69696965
Su

0 commit comments

Comments
 (0)