Skip to content

Commit

Permalink
Fix today button tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BenOsodrac committed Sep 22, 2023
1 parent c7dec45 commit c62e195
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,9 @@ namespace Providers.OSUI.Datepicker.Flatpickr {
public close(): void {
if (this.provider.isOpen) {
this.provider.close();
OSFramework.OSUI.Helper.A11Y.TabIndexFalse(this._todayButtonElem);
if(this.configs.ShowTodayButton) {
OSFramework.OSUI.Helper.A11Y.TabIndexFalse(this._todayButtonElem);
}
}
}

Expand Down Expand Up @@ -485,7 +487,9 @@ namespace Providers.OSUI.Datepicker.Flatpickr {
const isInputDisable = this.datePickerPlatformInputElem.disabled;
if (this.provider.isOpen === false && isInputDisable === false) {
this.provider.open();
OSFramework.OSUI.Helper.A11Y.TabIndexTrue(this._todayButtonElem);
if(this.configs.ShowTodayButton) {
OSFramework.OSUI.Helper.A11Y.TabIndexTrue(this._todayButtonElem);
}
}
}

Expand Down

0 comments on commit c62e195

Please sign in to comment.