How do I plot a graph using dates? / convert a date to build a graph?

Hi
I understand that the question may not be particularly relevant, but it may be useful to someone.
Using streamlit, I enter date data so that a graph is built on it. Doing it for the first time.

st.subheader(“Date parameters”)

today = datetime.date.today()
tomorrow = today + datetime.timedelta(days=1)
last_day = tomorrow - datetime.timedelta(days=1)

start = st.date_input('Start date')
end = st.date_input('End date', tomorrow)
last = st.date_input('Last date', last_day)

if start < end:
    st.success('Start date: `%s`\n\nEnd date: `%s`\n\n' % (start, end))
else:
    st.error('Error: End date must fall after start date.')

if last < end:
    st.success('Last date: `%s`\n\nEnd date: `%s`\n\n' % (last, end))
else:
    st.error('Error: End date must fall after last date.')

I tried to pass these parameters with “np.linspace” -
but it turned out that it won’t work from the word at all. Then they told me about - pd.date_range, but I don’t know how to apply it here.

t = pd.date_range(start=np.datetime64(start), end=np.datetime64(last), freq=“D”)
error: UFuncTypeError: Cannot cast ufunc ‘greater_equal’ input 0 from dtype(‘<m8[ns]’) to dtype(‘<m8’) with casting rule ‘same_kind’

Help me please)
image