Hello,
I’m building a dashboard for the french public.
I would like to know how it is possible to change the format of the datepicker (from YYYY/MM/DD to DD/MM/YYYY) ?
Also is it possible to translate the calendar part ?
Thanks in advance.
Hello,
I’m building a dashboard for the french public.
I would like to know how it is possible to change the format of the datepicker (from YYYY/MM/DD to DD/MM/YYYY) ?
Also is it possible to translate the calendar part ?
Thanks in advance.
Hi @Nabil_Servais,
Thanks for posting! Check out this thread.
You can use strftime from the Python datetime library to re-format the string any way you choose:
datetime — Basic date and time types — Python 3.10.8 documentation
That thread links to the documentation of datetime.date.strftime
. Please read through their docs to learn how to change the format of the datepicker (from YYYY/MM/DD to DD/MM/YYYY).
There currently is no support to translate Streamlit widgets from English to French. Please submit a feature request in the Streamlit repo if you’d like for our engineers and community to consider it.
Caroline
Hello,
Sorry, I don’t see your answer.
The thread doesn’t solve the issue at all.
The widget use english month and date format, for my users it’s an issue.
The format of date_input
is not configurable. There is a Github issue about that, I encourage you to subscribe and upvote: