Skip to content

Commit

Permalink
fix(ui-calendar): fix code to remove unnecessary warnings
Browse files Browse the repository at this point in the history
Closes: INSTUI-4222
  • Loading branch information
HerrTopi committed Sep 17, 2024
1 parent f39a158 commit bd995d4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/ui-calendar/src/Calendar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,14 @@ class Calendar extends Component<CalendarProps, CalendarState> {
<Calendar.Day
key={dateStr}
date={dateStr}
isSelected={selectedDate ? date.isSame(selectedDate, 'day') : false}
isSelected={
selectedDate
? date.isSame(
DateTime.parse(selectedDate, this.locale(), this.timezone()),
'day'
)
: false
}
isToday={date.isSame(today, 'day')}
isOutsideMonth={!date.isSame(visibleMonth, 'month')}
label={date.format('D MMMM YYYY')} // used by screen readers
Expand Down

0 comments on commit bd995d4

Please sign in to comment.