Refactor start_date as date rather then string

This commit is contained in:
Peter Stockings
2022-11-27 13:22:37 +11:00
parent 304e480e89
commit cd5f0fcf58
5 changed files with 25 additions and 13 deletions

View File

@@ -106,7 +106,7 @@
{% for w in person['Workouts'] %}
<tr>
<td class="p-4 whitespace-nowrap text-sm font-normal text-gray-500">
{{ w['StartDate'] }}
{{ strftime(w['StartDate'], "%b %d %Y") }}
</td>
{% for e in exercise_list %}

View File

@@ -1,5 +1,5 @@
{% if is_edit|default(false, true) == false %}
<span class="text-base font-normal text-gray-500">{{ start_date }}</span>
<span class="text-base font-normal text-gray-500">{{ strftime(start_date, "%b %d %Y") }}</span>
<a class="text-sm font-medium text-cyan-600 hover:bg-gray-100 rounded-lg inline-flex items-center p-2 cursor-pointer"
hx-get="{{ url_for('get_workout_start_date_edit_form', person_id=person_id, workout_id=workout_id) }}"
hx-target="#edit-start-date">