Skip to content

Commit

Permalink
feat(ts): optimize hiding fully disabled months
Browse files Browse the repository at this point in the history
  • Loading branch information
LuLaValva committed Nov 6, 2023
1 parent 0b6ef9b commit 3554420
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/ebay-calendar/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ export default class extends Marko.Component {
// In this case, we leave the tabindex and position as is. This is a fall-through case.
}
}
while (
this.state.disableAfter &&
this.getMonthDate(
this.state.offset + (input.numMonths || 1) - 1
).toISOString() > this.state.disableAfter
) {
this.state.offset--;
}
}

/**
Expand Down

0 comments on commit 3554420

Please sign in to comment.