Datetime slider

Hello, i use the methode 1 in the StackOverflow example to filtring dataframe by various date, but i have this message error :

Have you any idea for the cause of the issue ?

Please find below the code that i used :

df = ld.load_data_projet()

start_date = st.date_input('Date de début :')
end_date = st.date_input('Date de fin :')
if start_date < end_date:
    pass
else:
    st.error('Error: Date de fin doit être choisi après la dete de début.')

mask = (df['CREATEDDATE'] > start_date) & (df['CREATEDDATE'] <= end_date)
df = df.loc[mask]
# And display the result!
st.dataframe(df)

Thanks