streamlit / streamlit

Streamlit — A faster way to build and share data apps.
https://streamlit.io
Apache License 2.0
35.55k stars 3.08k forks source link

DatetimeColumn formatting options #8236

Open amanchaudhary-95 opened 8 months ago

amanchaudhary-95 commented 8 months ago

Checklist

Summary

The current st.column_config.DatetimeColumn gives the default HTML5 datetime picker. There are 3 issues with it.

  1. There is no 'Ok' or 'select' or any confirmation button. The user have to click outside of the datetime picker to select a date and time. This is very inconvenient for the users.
  2. The current datetime picker makes date time picking a bit different for new users. It's not as easy as st.date_input and st.time_input.
  3. The default datetime picker is not customisable and doesn't match with Streamlit's theme.

Why?

I'm making an app in which the user have to pick date and time as input. The default HTML5 datetime picker makes it different for the user to pick the currect date amd time due to its not so friendly UI.

How?

The st.column_config.DatetimeColumn should have similar date and time input as the st.date_input and st.time_input

Additional Context

No response

github-actions[bot] commented 8 months ago

To help Streamlit prioritize this feature, react with a 👍 (thumbs up emoji) to the initial post.

Your vote helps us identify which enhancements matter most to our users.

Visits

lukasmasuch commented 8 months ago

@amanchaudhary-95 Thanks for the suggestions! One of the main reasons why we decided to use the HTML5 datetime picker was that we don't yet have a datetime_input in Streamlit (see this feature request). The underlying UI framework (baseweb UI) also doesn't have a combined datetime picker. So it will take more time and effort to get that implemented in Streamlit.

Once we have a proper datetime_input in Streamlit, we will probably switch to this for the DateTime column as well.