From e34474c96968836fd003bae78e3c6dac538ac349 Mon Sep 17 00:00:00 2001 From: Vyacheslav Shaganov Date: Thu, 12 Dec 2024 22:54:00 +0300 Subject: [PATCH] added registration date filter --- frontend/advanced_user_search.html | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/frontend/advanced_user_search.html b/frontend/advanced_user_search.html index e41b266..1d9846a 100644 --- a/frontend/advanced_user_search.html +++ b/frontend/advanced_user_search.html @@ -26,7 +26,7 @@

Расширенный поиск пользовател -
+
@@ -34,15 +34,20 @@

Расширенный поиск пользовател

+
+ + +
+
+
+
- -
@@ -56,7 +61,9 @@

Расширенный поиск пользовател const username = document.querySelector("input[name='username']").value; const min_visits = document.querySelector("input[name='min_visits']").value; const max_visits = document.querySelector("input[name='max_visits']").value; - + const created_at_from = document.querySelector("input[name='created_at_from']").value; + const created_at_to = document.querySelector("input[name='created_at_to']").value; + // new Date('2024-12-12').getTime() let data = { last_name: last_name, first_name: first_name, @@ -66,6 +73,10 @@

Расширенный поиск пользовател }; if (max_visits) data.max_visits = max_visits; + if (created_at_from) + data.created_at_from = new Date(created_at_from).getTime(); + if (created_at_to) + data.created_at_to = new Date(created_at_to).getTime(); console.log(data); let list = document.getElementById("found-users-list");