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:
parent
ed3f281092
commit
88d42f4da9
1 changed files with 4 additions and 0 deletions
|
@ -13,6 +13,7 @@
|
||||||
v-for="(name, idx) in monthNames"
|
v-for="(name, idx) in monthNames"
|
||||||
:key="idx"
|
:key="idx"
|
||||||
:value="idx"
|
:value="idx"
|
||||||
|
:disabled="dateComponents.fromYear === dateComponents.toYear && idx > dateComponents.toMonth"
|
||||||
>
|
>
|
||||||
{{ name }}
|
{{ name }}
|
||||||
</option>
|
</option>
|
||||||
|
@ -25,6 +26,7 @@
|
||||||
v-for="year in years"
|
v-for="year in years"
|
||||||
:key="year"
|
:key="year"
|
||||||
:value="year"
|
:value="year"
|
||||||
|
:disabled="year > dateComponents.toYear"
|
||||||
>
|
>
|
||||||
{{ year }}
|
{{ year }}
|
||||||
</option>
|
</option>
|
||||||
|
@ -41,6 +43,7 @@
|
||||||
v-for="(name, idx) in monthNames"
|
v-for="(name, idx) in monthNames"
|
||||||
:key="idx"
|
:key="idx"
|
||||||
:value="idx"
|
:value="idx"
|
||||||
|
:disabled="dateComponents.fromYear === dateComponents.toYear && idx < dateComponents.fromMonth"
|
||||||
>
|
>
|
||||||
{{ name }}
|
{{ name }}
|
||||||
</option>
|
</option>
|
||||||
|
@ -53,6 +56,7 @@
|
||||||
v-for="year in years"
|
v-for="year in years"
|
||||||
:key="year"
|
:key="year"
|
||||||
:value="year"
|
:value="year"
|
||||||
|
:disabled="year < dateComponents.fromYear"
|
||||||
>
|
>
|
||||||
{{ year }}
|
{{ year }}
|
||||||
</option>
|
</option>
|
||||||
|
|
Loading…
Reference in a new issue