fix cashbook - month and year selection

This commit is contained in:
beo3000 2026-01-04 14:03:33 +01:00
parent 2632947d1f
commit 7af5fb909e
1 changed files with 4 additions and 2 deletions

View File

@ -13,13 +13,15 @@
<MudSelect T="int" @bind-Value="_selectedMonth" Label="Monat" Style="width: 150px;"> <MudSelect T="int" @bind-Value="_selectedMonth" Label="Monat" Style="width: 150px;">
@for (int m = 1; m <= 12; m++) @for (int m = 1; m <= 12; m++)
{ {
<MudSelectItem Value="@m">@GetMonthName(m)</MudSelectItem> var month = m;
<MudSelectItem Value="@month">@GetMonthName(month)</MudSelectItem>
} }
</MudSelect> </MudSelect>
<MudSelect T="int" @bind-Value="_selectedYear" Label="Jahr" Style="width: 120px;"> <MudSelect T="int" @bind-Value="_selectedYear" Label="Jahr" Style="width: 120px;">
@for (int y = DateTime.Today.Year; y >= DateTime.Today.Year - 2; y--) @for (int y = DateTime.Today.Year; y >= DateTime.Today.Year - 2; y--)
{ {
<MudSelectItem Value="@y">@y</MudSelectItem> var year = y;
<MudSelectItem Value="@year">@year</MudSelectItem>
} }
</MudSelect> </MudSelect>
</MudStack> </MudStack>