WTForms 相当于 <input type="time">

WTForms equivalent to <input type="time">

我正在使用使用 wtforms 的 flask 构建一个 webapp(对我来说是一个教育项目),我 运行 遇到了以下问题: 我需要能够以开始时间和结束时间的形式收集用户的输入,为此我认为 html5

input type="time"

会很完美,但是我在 wtforms 文档中找不到等效项。谷歌搜索问题也没有产生任何解决方案。似乎可用的最接近的东西是 DateTimeLocalField,但我不想 store/display 日期信息。 作为一种解决方法,我可能只使用 2 个 SelectFields,一个用于几个小时,一个用于几分钟,但也许我遗漏了一些明显的东西。 有没有办法让 DateTime(Local)Field 只显示时间,或者用 wtforms 创建一个 'TimeField'?

感谢 hjpotter92 的建议。

WTForms-Components 具有可用的确切相关字段。

from wtforms_components import TimeField

class Timeform(FlaskForm):
    start = TimeField('start')