Skip to content

Commit

Permalink
feat(datepicker): bug fix for date selection
Browse files Browse the repository at this point in the history
  • Loading branch information
dilandoogan committed Dec 4, 2024
1 parent 20b534d commit c1fb38f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/calendar/bl-calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ export default class BlCalendar extends DatepickerCalendarMixin {
if (this.type !== CALENDAR_TYPES.RANGE) {
const isDateBiggerThanCalendar =
(date.getMonth() < this._calendarMonth && date.getFullYear() > this._calendarYear) ||
(date.getMonth() >= this._calendarMonth && date.getFullYear() >= this._calendarYear);
(date.getMonth() > this._calendarMonth && date.getFullYear() == this._calendarYear);

const isDateSmallerThanCalendar =
(date.getMonth() <= this._calendarMonth && date.getFullYear() <= this._calendarYear) ||
(date.getMonth() < this._calendarMonth && date.getFullYear() == this._calendarYear) ||
(date.getMonth() > this._calendarMonth && date.getFullYear() < this._calendarYear);

if (isDateSmallerThanCalendar) {
Expand Down

0 comments on commit c1fb38f

Please sign in to comment.