charts, legend bottom
This commit is contained in:
@@ -111,12 +111,14 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
const startDateInput = document.getElementById("startDate");
|
||||
const endDateInput = document.getElementById("endDate");
|
||||
|
||||
// domyslnie 1-dzis w custom zakresie
|
||||
const today = new Date();
|
||||
const lastWeek = new Date(today);
|
||||
lastWeek.setDate(today.getDate() - 7);
|
||||
const formatDate = (d) => d.toISOString().split('T')[0];
|
||||
startDateInput.value = formatDate(lastWeek);
|
||||
endDateInput.value = formatDate(today);
|
||||
const firstDay = new Date(today.getFullYear(), today.getMonth(), 1);
|
||||
const lastDay = new Date(today.getFullYear(), today.getMonth() + 1, 0);
|
||||
|
||||
startDateInput.value = formatDate(firstDay);
|
||||
endDateInput.value = formatDate(lastDay);
|
||||
|
||||
loadExpenses();
|
||||
|
||||
|
Reference in New Issue
Block a user