2022-02-10 20:51:50 +00:00
|
|
|
<BasicDropdown @class="popup-menu" @horizontalPosition="auto-right" @verticalPosition="below" as |D|>
|
|
|
|
<D.Trigger
|
2022-02-24 20:04:40 +00:00
|
|
|
data-test-popup-menu-trigger="month"
|
2022-02-10 20:51:50 +00:00
|
|
|
class={{concat "toolbar-link" (if D.isOpen " is-active")}}
|
|
|
|
@htmlTag="button"
|
|
|
|
>
|
|
|
|
{{or this.startMonth "Month"}}
|
|
|
|
<Chevron @direction="down" @isButton={{true}} />
|
|
|
|
</D.Trigger>
|
2022-02-15 17:43:37 +00:00
|
|
|
<D.Content @defaultClass="popup-menu-content is-wide">
|
2022-10-18 15:46:02 +00:00
|
|
|
<nav class="box menu scroll" aria-label="months">
|
2022-02-24 20:04:40 +00:00
|
|
|
<ul data-test-month-list class="menu-list">
|
2022-02-17 20:17:59 +00:00
|
|
|
{{#each this.months as |month index|}}
|
2022-02-10 20:51:50 +00:00
|
|
|
<button
|
|
|
|
type="button"
|
2022-02-17 20:17:59 +00:00
|
|
|
class="button link"
|
|
|
|
disabled={{if (lt index this.allowedMonthMax) false true}}
|
|
|
|
{{on "click" (fn this.selectStartMonth month D.actions)}}
|
2022-02-10 20:51:50 +00:00
|
|
|
>
|
|
|
|
{{month}}
|
|
|
|
</button>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</D.Content>
|
|
|
|
</BasicDropdown>
|
|
|
|
<BasicDropdown @class="popup-menu" @horizontalPosition="auto-right" @verticalPosition="below" as |D|>
|
|
|
|
<D.Trigger
|
2022-02-24 20:04:40 +00:00
|
|
|
data-test-popup-menu-trigger="year"
|
2022-02-10 20:51:50 +00:00
|
|
|
class={{concat "toolbar-link" (if D.isOpen " is-active")}}
|
|
|
|
@htmlTag="button"
|
|
|
|
>
|
|
|
|
{{or this.startYear "Year"}}
|
|
|
|
<Chevron @direction="down" @isButton={{true}} />
|
|
|
|
</D.Trigger>
|
2022-02-15 17:43:37 +00:00
|
|
|
<D.Content @defaultClass="popup-menu-content is-wide">
|
2022-10-18 15:46:02 +00:00
|
|
|
<nav class="box menu" aria-label="years">
|
2022-02-24 20:04:40 +00:00
|
|
|
<ul data-test-year-list class="menu-list">
|
2022-02-10 20:51:50 +00:00
|
|
|
{{#each this.years as |year|}}
|
2022-02-17 20:17:59 +00:00
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="button link"
|
|
|
|
disabled={{if (eq year this.disabledYear) true false}}
|
|
|
|
{{on "click" (fn this.selectStartYear year D.actions)}}
|
|
|
|
>
|
2022-02-10 20:51:50 +00:00
|
|
|
{{year}}
|
|
|
|
</button>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</D.Content>
|
|
|
|
</BasicDropdown>
|
|
|
|
<button
|
2022-02-24 20:04:40 +00:00
|
|
|
data-test-date-dropdown-submit
|
2022-02-10 20:51:50 +00:00
|
|
|
type="button"
|
|
|
|
class="button is-primary"
|
|
|
|
disabled={{if (and this.startMonth this.startYear) false true}}
|
2022-02-14 18:27:09 +00:00
|
|
|
{{on "click" this.saveDateSelection}}
|
2022-02-10 20:51:50 +00:00
|
|
|
>
|
2022-02-17 20:17:59 +00:00
|
|
|
{{or @submitText "Submit"}}
|
2022-02-10 20:51:50 +00:00
|
|
|
</button>
|