Add 'Today' button next to date filter label

This commit is contained in:
2025-11-07 20:37:17 +03:00
parent ed2647e45c
commit efeb396204
2 changed files with 48 additions and 4 deletions

View File

@@ -14,10 +14,19 @@
{% load static %}
<div class="date-range-filter mb-3">
<label class="form-label">
<i class="bi bi-{{ icon|default:'calendar-range' }}"></i>
{{ label }}
</label>
<div class="d-flex align-items-center justify-content-between">
<label class="form-label mb-0">
<i class="bi bi-{{ icon|default:'calendar-range' }}"></i>
{{ label }}
</label>
<button type="button" class="btn btn-sm btn-outline-primary ms-2 today-btn"
data-min-input="{{ field_after.id_for_label }}"
data-max-input="{{ field_before.id_for_label }}"
title="Сегодня">
Сегодня
</button>
</div>
<!-- Скрытые поля для хранения дат -->
<div class="d-none">