From a82b505cb15392b4c5857dd1d403302b1b674bde Mon Sep 17 00:00:00 2001 From: Corban-Lee Jones Date: Thu, 11 Jul 2024 10:27:15 +0100 Subject: [PATCH] no longer using bootstrap datepicker --- apps/static/css/home/index.css | 7 ------- apps/static/js/base.js | 14 ++++++++++++-- apps/templates/home/includes/submodal.html | 11 +++-------- apps/templates/layouts/base.html | 2 -- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/apps/static/css/home/index.css b/apps/static/css/home/index.css index d27a219..c2b6902 100644 --- a/apps/static/css/home/index.css +++ b/apps/static/css/home/index.css @@ -70,10 +70,3 @@ td { height: 100%; } } - -/* hide date picker calendar */ -input[type="date"]::-webkit-inner-spin-button, -input[type="date"]::-webkit-calendar-picker-indicator { - display: none; - -webkit-appearance: none; -} \ No newline at end of file diff --git a/apps/static/js/base.js b/apps/static/js/base.js index 8bcb7e7..d44428c 100644 --- a/apps/static/js/base.js +++ b/apps/static/js/base.js @@ -9,6 +9,16 @@ function updateTheme(theme) { localStorage.setItem("theme", theme); } +function getCurrentDateTime() { + var now = new Date(); + var year = now.getFullYear(); + var month = String(now.getMonth() + 1).padStart(2, '0'); + var day = String(now.getDate()).padStart(2, '0'); + var hours = String(now.getHours()).padStart(2, '0'); + var minutes = String(now.getMinutes()).padStart(2, '0'); + return `${year}-${month}-${day}T${hours}:${minutes}`; +} + $(document).ready(function() { // Activate all tooltips $('[data-bs-toggle="tooltip"]').tooltip(); @@ -18,13 +28,13 @@ $(document).ready(function() { var dropdownParent = $(this).attr("data-dropdownparent"); $(this).select2({ theme: "bootstrap", - minimumResultsForSearch: 5, + minimumResultsForSearch: 10, dropdownParent: dropdownParent }); }); // Activate datepickers - $(".input-group.date").datepicker({format: "yyyy-mm-dd"}); + // $(".input-group.date").datepicker({format: "yyyy-mm-dd"}); // Load theme var theme = localStorage.getItem("theme"); diff --git a/apps/templates/home/includes/submodal.html b/apps/templates/home/includes/submodal.html index 2cb39d2..aabf3dc 100644 --- a/apps/templates/home/includes/submodal.html +++ b/apps/templates/home/includes/submodal.html @@ -134,14 +134,9 @@
- -
- -
- -
-
-
RSS content older than this date will be skipped.
+ + +
RSS content older than this datetime will be skipped.
diff --git a/apps/templates/layouts/base.html b/apps/templates/layouts/base.html index 5c9fdc8..060ea51 100644 --- a/apps/templates/layouts/base.html +++ b/apps/templates/layouts/base.html @@ -26,7 +26,6 @@ - {% block stylesheets %}{% endblock stylesheets %} @@ -52,7 +51,6 @@ -