Datetime date_input error

  1. Are you running your app locally or is it deployed?
  • Locally
  1. Share the full text of the error message (not a screenshot).
  • Prompted The default value of [datetime.date(2025, 4, 2)] must lie between the min_value of 2025-01-29 and the max_value of 2025-03-26, inclusively.
  1. Share the Streamlit and Python versions.
  • Streamlit version: 1.44.0
  • Python version: 3.13.2

code snipped

start_date = st.date_input('Start Date', min_value=start_date_min, max_value=start_date_max, value=start_date_min, key='start_date')
end_date = st.date_input('End Date', min_value=start_date_min, max_value=start_date_max, value=start_date_max, key='end_date')

Anyone had this issue with date_input error above?

April 2nd does come after March 26th and thus the error. Perhaps you did not mean to set the max_value of end_date equal to start_date_max but to something else?

It does look odd to me – can you share a full reproducible script? Can you try just setting start_date_min and start_date_max on lines right above the snippet you shared, and share that plus the result?

Nevermind, I change the date_input to be a fixed date instead of taking the min and max of the dataframe date column.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.