Replaces date elements with datepicker

This commit is contained in:
Mouse Reeve
2021-05-04 09:04:21 -07:00
parent 33ca7b4b76
commit 869cfa6d34
5 changed files with 38 additions and 7 deletions

View File

@@ -5,7 +5,11 @@
<div class="field">
<label class="label">
{% trans "Started reading" %}
<input type="date" name="start_date" class="input" id="id_start_date-{{ readthrough.id }}" value="{{ readthrough.start_date | date:"Y-m-d" }}">
<duet-date-picker
identifier="id_start_date-{{ readthrough.id }}"
name="start_date"
value="{{ readthrough.start_date | date:'Y-m-d' }}">
</duet-date-picker>
</label>
</div>
{# Only show progress for editing existing readthroughs #}
@@ -28,6 +32,10 @@
<div class="field">
<label class="label">
{% trans "Finished reading" %}
<input type="date" name="finish_date" class="input" id="id_finish_date-{{ readthrough.id }}" value="{{ readthrough.finish_date | date:"Y-m-d" }}">
<duet-date-picker
identifier="id_finish_date-{{ readthrough.id }}"
name="finish_date"
value="{{ readthrough.finish_date | date:'Y-m-d' }}">
</duet-date-picker>
</label>
</div>