【发布时间】:2016-10-10 12:26:41
【问题描述】:
我想要这样的等价物:
<input type="week" (...)>
使用 Symfony 表单。
我试试这个:
{{ form_widget(form.date, {'attr': {'type': 'week'}}) }}
但它不起作用,我明白了:
<input type="date" (...) required="required" class="form-control" type="week" />
我使用这种类型:
DateType::class
谢谢。
【问题讨论】: