我正在尝试DatePicker
在我的表单中使用此表单类型Twig
:
https
://github.com/mohebifar/DateTimeBundle
使用jquery
此处描述的小部件:
https ://github.com/mohebifar/DateTimeBundle/blob/master/Resources/doc/ 2.3-日期选择器-form-type.md
像这样:
{% block headassets %}
{% stylesheets 'bundles/itwuser/css/*.css' filter='cssrewrite' %}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
{{ form_datetime_css(form) }}
{{ form_datetime_js_asset(form) }}
{{ form_datetime_js(form) }}
{% endblock %}
但我马上就知道LogicException
了form_datetime_css(form)
LogicException: Unable to render the form as none of the following blocks exist: "_itw_userbundle_user_css", "itw_userbundle_user_css", "form_css".
问题是什么?
更新:
我添加了主题:
{% form_theme form 'MohebifarDateTimeBundle::form_fields.html.twig' %}
但仍然发生同样的异常!