Reduce confusion in date selector

by disabling entries which would cause from > to

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2024-01-22 21:47:17 +01:00
parent ed3f281092
commit 88d42f4da9
Signed by: luzifer
SSH Key Fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E

View File

@ -13,6 +13,7 @@
v-for="(name, idx) in monthNames"
:key="idx"
:value="idx"
:disabled="dateComponents.fromYear === dateComponents.toYear && idx > dateComponents.toMonth"
>
{{ name }}
</option>
@ -25,6 +26,7 @@
v-for="year in years"
:key="year"
:value="year"
:disabled="year > dateComponents.toYear"
>
{{ year }}
</option>
@ -41,6 +43,7 @@
v-for="(name, idx) in monthNames"
:key="idx"
:value="idx"
:disabled="dateComponents.fromYear === dateComponents.toYear && idx < dateComponents.fromMonth"
>
{{ name }}
</option>
@ -53,6 +56,7 @@
v-for="year in years"
:key="year"
:value="year"
:disabled="year < dateComponents.fromYear"
>
{{ year }}
</option>