no longer using bootstrap datepicker

This commit is contained in:
Corban-Lee Jones 2024-07-11 10:27:15 +01:00
parent 9363b860e6
commit a82b505cb1
4 changed files with 15 additions and 19 deletions

View File

@ -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;
}

View File

@ -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");

View File

@ -134,14 +134,9 @@
</div>
<div class="col-lg-6 ps-lg-4">
<div class="mb-4">
<label for="subPubThreshold" class="form-label">Publish Date Threshold</label>
<div class="input-group date">
<input type="date" name="subPubThreshold" id="subPubThreshold" class="form-control" placeholder="yyyy-mm-dd">
<div class="input-group-addon input-group-text">
<i class="bi bi-calendar2-event"></i>
</div>
</div>
<div class="form-text">RSS content older than this date will be skipped.</div>
<label for="subPubThreshold" class="form-label">Publish Datetime Threshold</label>
<input type="datetime-local" name="subPubThreshold" id="subPubThreshold" class="form-control">
<div class="form-text">RSS content older than this datetime will be skipped.</div>
</div>
</div>
<div class="col-lg-6 pe-lg-4">

View File

@ -26,7 +26,6 @@
<link type="text/css" rel="stylesheet" href="https://cdn.datatables.net/select/2.0.1/css/select.dataTables.min.css">
<link type="text/css" rel="stylesheet" href="{% static '/css/select2.min.css' %}">
<link type="text/css" rel="stylesheet" href="{% static '/css/select2-bootstrap.min.css' %}">
<link type="text/css" rel="stylesheet" href="{% static '/css/bootstrap-datepicker3.min.css' %}">
{% block stylesheets %}{% endblock stylesheets %}
</head>
@ -52,7 +51,6 @@
<script src="https://cdn.datatables.net/select/2.0.1/js/dataTables.select.min.js"></script>
<script src="{% static '/js/bootstrap.bundle.min.js' %}"></script>
<script src="{% static '/js/select2.min.js' %}"></script>
<script src="{% static '/js/bootstrap-datepicker.min.js' %}"></script>
<script src="{% static '/js/toasts.js' %}"></script>
<script src="{% static '/js/base.js' %%}"></script>