Uses custom date select widget for publication dates

This commit is contained in:
Mouse Reeve
2022-03-19 08:44:30 -07:00
parent db5f509475
commit a701bfcf8e
5 changed files with 26 additions and 36 deletions

View File

@ -0,0 +1,10 @@
<div class="select">
<select
name="{{ widget.name }}"
{% include "django/forms/widgets/attrs.html" %}
>{% for group_name, group_choices, group_index in widget.optgroups %}{% if group_name %}
<optgroup label="{{ group_name }}">{% endif %}{% for option in group_choices %}
{% include option.template_name with widget=option %}{% endfor %}{% if group_name %}
</optgroup>{% endif %}{% endfor %}
</select>
</div>