I have a form with these two values (ndb is the Google App Engine ndb model):
model:
class Appointment(model.Base):
start_time = ndb.DateTimeProperty(required=True)
end_time = ndb.DateTimeProperty(required=True)
form (using wtforms):
class AppointmentUpdateForm(wtf.Form):
start_time = wtforms.DateField('Start at', [wtforms.validators.required()])
end_time = wtforms.DateField('End at', [wtforms.validators.required()])
And in the jinja2 template I have:
{{forms.date_field(form.start_time, format='%Y-%m-%d %H:%M:%S')}}
{{forms.date_field(form.end_time)}}
I want to display the form inputs as time widget but it looks like a date field. I think wtforms has a date_time field but how can I implement that?