How to query data by datepickerrange

I have set one datepickerrange in dash.
How I can query MySQL database data by datepikerrange?

In MySQL, it can run as below pic.

And the script in dash as below. But it get the empty result.


Is there any wrong in my script?

start_date ( string ; optional): Specifies the starting date for the component. Accepts datetime.datetime objects or strings in the format ‘YYYY-MM-DD’.

end_date ( string ; optional): Specifies the ending date for the component. Accepts datetime.datetime objects or strings in the format ‘YYYY-MM-DD’.

sql=f'select * from abc where TIME between {start_date} and {end_date}'

The column in MySQL already is the datetime format.
The datepickrange should be change to the datetime format?