I found this on DatePickerWidget with Flask, Flask-Admin and WTforms and this is perfect but I need two datepickers because I want to pickup 2 date (start and end date) for SQL query
py file:
class ExampleForm(Form):
dt = DateField('DatePicker', format='%Y-%m-%d')
and here I assign to variable:
date = form.dt.data.strftime('%Y-%m-%d')
html file:
<form action="#" method="post">
{{ form.dt(class='datepickerA') }}
{{ form.hidden_tag() }}
<input type="submit"/>
I'm not sure how to add one more picker and assign to 2 variable in py file?
Thanks in advance