allow to remove date from non-required field (#4040)

This commit is contained in:
Kevin Papst
2023-05-21 17:13:41 +02:00
committed by GitHub
parent 7ab0a8cea1
commit fdb6cf5cf8

View File

@@ -127,6 +127,13 @@
<a href="#" data-form-widget="date-now" data-format="{{ jsFormat }}" data-target="{{ id }}">{{ icon('calendar') }}</a>
</div>
{{- block('form_widget_simple') -}}
{% if not required %}
<span class="input-group-text">
<a href="#" class="link-secondary fs-5" onclick="document.getElementById('{{ id }}').value = ''">
{{ icon('cancel') }}
</a>
</span>
{% endif %}
</div>
{%- endblock date_widget %}