update collapse menu

This commit is contained in:
2025-11-06 21:49:07 +03:00
parent 0b75345856
commit fac2746902

View File

@@ -129,8 +129,11 @@
$: monthlyData = (() => { $: monthlyData = (() => {
const months = []; const months = [];
// Show all 12 months for the selected year // Determine max month to show (don't show future months)
for (let i = 11; i >= 0; i--) { const maxMonth = selectedYear === currentYear ? currentMonth : 11;
// Show months from maxMonth down to January
for (let i = maxMonth; i >= 0; i--) {
const data = getMonthData(i); const data = getMonthData(i);
const monthData = { const monthData = {
month: i, month: i,