Skip to content

fix(DateTimePicker): scope the panel's layout to the panel, not to the field - #703

Merged
mrholek merged 1 commit into
v6-devfrom
fix/date-time-picker-panel-scope-v6
Aug 6, 2026
Merged

fix(DateTimePicker): scope the panel's layout to the panel, not to the field#703
mrholek merged 1 commit into
v6-devfrom
fix/date-time-picker-panel-scope-v6

Conversation

@mrholek

@mrholek mrholek commented Aug 6, 2026

Copy link
Copy Markdown
Member

.date-time-picker .date-picker-timepickers and the --cui-time-picker-* properties the time body needs sat under the field's root, so they stop applying the moment the panel leaves it — which container does by teleporting it, and which a framework port does by default when it renders the panel through a portal.

The result: the calendar and the time body stack instead of sitting side by side, and the columns lose the properties that size them. Measured in the React port, whose panel is portaled by default: the panel went 1442 px tall (five columns stacked) instead of 388 px.

The panel already owns its tokens for exactly this reason — the comment above .date-picker-popup in this file spells it out. These two blocks move onto it as well. The scope stays exact: a .date-picker-timepickers, and a .time-picker-body inside a date picker panel, exist only in the date-time picker.

Found while porting the v2 pickers to React (coreui-react-pro#83).

…e field

`.date-time-picker .date-picker-timepickers` and the time tokens it needs sat
under the field's root, so they stopped applying the moment the panel left it —
which `container` does by teleporting, and which a framework port does by
default when it renders the panel through a portal. The calendar and the time
body then stacked instead of sitting side by side, and the columns lost the
`--cui-time-picker-*` properties that size them.

The panel already owns its tokens for this exact reason (see `.date-picker-popup`
in this file). These two blocks move onto it as well. The scope stays exact:
`.date-picker-timepickers` and a `.time-picker-body` inside a date picker panel
exist only in the date-time picker.
@mrholek
mrholek merged commit 61a03e9 into v6-dev Aug 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant