diff --git a/Resources/views/layout/form-theme-base.html.twig b/Resources/views/layout/form-theme-base.html.twig index 57ef44b..b3a72d6 100644 --- a/Resources/views/layout/form-theme-base.html.twig +++ b/Resources/views/layout/form-theme-base.html.twig @@ -113,12 +113,14 @@ - {% if attr.class is defined %} - {% set class = attr.class ~ ' timepicker' %} - {% else %} - {% set class = ' timepicker' %} + {% if type is not defined or type != 'date' %} + {% if attr.class is defined %} + {% set class = attr.class ~ ' timepicker' %} + {% else %} + {% set class = ' timepicker' %} + {% endif %} + {% set attr = attr|merge({'class' : class, 'data-datepickerenable':'on'}) %} {% endif %} - {% set attr = attr|merge({'class' : class, 'data-datepickerenable':'on'}) %} {{ block('form_widget_simple') }} @@ -144,12 +146,14 @@
- {% if attr.class is defined %} - {% set class = attr.class ~ ' timepicker' %} - {% else %} - {% set class = ' timepicker' %} + {% if type is not defined or type != 'time' %} + {% if attr.class is defined %} + {% set class = attr.class ~ ' timepicker' %} + {% else %} + {% set class = ' timepicker' %} + {% endif %} + {% set attr = attr|merge({'class' : class, 'data-timepicker':'on'}) %} {% endif %} - {% set attr = attr|merge({'class' : class, 'data-timepicker':'on'}) %} {{ block('form_widget_simple') }} diff --git a/Resources/views/layout/form-theme-horizontal.html.twig b/Resources/views/layout/form-theme-horizontal.html.twig index e6212d6..fbb4d38 100644 --- a/Resources/views/layout/form-theme-horizontal.html.twig +++ b/Resources/views/layout/form-theme-horizontal.html.twig @@ -113,12 +113,14 @@ - {% if attr.class is defined %} - {% set class = attr.class ~ ' timepicker' %} - {% else %} - {% set class = ' timepicker' %} + {% if type is not defined or type != 'date' %} + {% if attr.class is defined %} + {% set class = attr.class ~ ' timepicker' %} + {% else %} + {% set class = ' timepicker' %} + {% endif %} + {% set attr = attr|merge({'class' : class, 'data-datepickerenable':'on'}) %} {% endif %} - {% set attr = attr|merge({'class' : class, 'data-datepickerenable':'on'}) %} {{ block('form_widget_simple') }} @@ -144,12 +146,14 @@
- {% if attr.class is defined %} - {% set class = attr.class ~ ' timepicker' %} - {% else %} - {% set class = ' timepicker' %} + {% if type is not defined or type != 'time' %} + {% if attr.class is defined %} + {% set class = attr.class ~ ' timepicker' %} + {% else %} + {% set class = ' timepicker' %} + {% endif %} + {% set attr = attr|merge({'class' : class, 'data-timepicker':'on'}) %} {% endif %} - {% set attr = attr|merge({'class' : class, 'data-timepicker':'on'}) %} {{ block('form_widget_simple') }}