St.date_input not working in the sidebar on mobile devices / very narrow windows?

Since some recent time, st. date_input is not working anymore when it is put in the sidebar (e.g., st.sidebar.date_input()) and the streamlit app is either run on a mobile device or with a very narrow browser window (the important point is that the app width is so small that the sidebar is automatically hidden). In these cases, opening the sidebar first, then the st. date_input, and then trying to change the month or the year results in the whole sidebar being collapsed again, rendering the input method unusable.

The problem occurs when streamlit is run locally (with the latest version 1.33.0) or in the cloud. See example code at streamlit_bug/ at main Β· jgieseler/streamlit_bug Β· GitHub and corresponding app at

To reproduce the bug:

  • Open app at (or locally)
  • Reduce browser window width until the sidebar is automatically hidden (not needed when opening with mobile device)
  • Open sidebar by clicking on the > in the top left
  • Click on the date picker
  • Click on the month or year to change it
  • The sidebar will collapse

I’m not sure if this problem is connected to date_input on sidebar has a display issue Β· Issue #6107 Β· streamlit/streamlit Β· GitHub

Anyone else noticed this behavior and maybe has a workaround at hand?

I see the issue you’re seeing, and this is a really great bug report. Could you post this at Issues Β· streamlit/streamlit Β· GitHub?

I think this is a different issue than the display issue you already linked, and definitely worth posting as a new issue on github.

Done: st.date_input not working in the sidebar on mobile devices or very narrow windows Β· Issue #8556 Β· streamlit/streamlit Β· GitHub