I'm using wtforms in python, and everything is working fine, but I want to round the TimeFiled to hour only and keep the minutes in 00. For example 14:00, 15:00, so the user can choose only hour, not minutes.
My forms.py:
class DateForm(FlaskForm):
name = StringField("Nombre", validators=[DataRequired()])
email = StringField("Email", validators=[DataRequired()])
date = DateField("Fecha", validators=([InputRequired(), DataRequired()]))
hour = TimeField("Hora", validators=([InputRequired(), DataRequired()]))
submit = SubmitField("Agendar cita")
my appointment.html:
{{ form.csrf_token() }}
{{ wtf.quick_form(form, novalidate=True, button_map={"submit": "primary"}) }}
{% with messages = get_flashed_messages() %}
{% if messages %}
{% for message in messages %}
<p style="color:red">{{ message }}</p>
{% endfor %}
{% endif %}
{% endwith %}