You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Daterange picker layout changes Dash 3.4 to 4.0 to 4.1 #3784
When using a daterange picker with style={"width": "fit-content"} inside a dashbootstrap Row, the layout keeps changing between Dash releases. Biggest change is from Dash 3.4 to Dash 4.0, but Dash 4.0 to 4.1 introduced another layout change.
The following example creates 3 different layouts, but under 3.4 it works as expected:
Thank you for the proposed workaround. I think only dcc.DatePickerRange and dcc.DatePickerSingle are affected. All other dcc do not insert additional div's around the component. Which makes for a somewhat inconsistent Developer experience and perhaps hard to understand for a HTML/CSS novice.
After the Dash 4.0 we fixed up the various Date pickers with an added CSS rule:
.dash-datepicker{max-width:250px!important;}
However this broke again in 4.1 due to an additional pure div (no style, id, or class) surrounding the <div class= dash-datepicker>
If it is not possible to go back to original 3.4 layout, would it be possible to remove the additional pure div introduced in 4.1?
Activity
AnnMarieW commentedon May 14, 2026
There are some changes that affect style when moving to the dash 4 components.
In this case, you can get the same result by applying the style to an outer container of the date picker component. For example:
ghaarsma commentedon May 18, 2026
Thank you for the proposed workaround. I think only
dcc.DatePickerRangeanddcc.DatePickerSingleare affected. All other dcc do not insert additional div's around the component. Which makes for a somewhat inconsistent Developer experience and perhaps hard to understand for a HTML/CSS novice.After the Dash 4.0 we fixed up the various Date pickers with an added CSS rule:
However this broke again in 4.1 due to an additional pure div (no style, id, or class) surrounding the
<div class= dash-datepicker>If it is not possible to go back to original 3.4 layout, would it be possible to remove the additional pure div introduced in 4.1?