Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
Hotfix for window check
Browse files Browse the repository at this point in the history
  • Loading branch information
arnemolland committed Oct 4, 2021
1 parent 8e00029 commit e472549
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/components/inputs/Calendar/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {

const getFirstDayOfWeek = () => {
let lang = 'en-gb'
if (window) {
if (typeof window !== 'undefined') {
lang = navigator?.language?.toLowerCase() ?? 'en-gb'
}

Expand Down Expand Up @@ -296,8 +296,7 @@ export const Calendar = forwardRef((props: CalendarProps, ref) => {
(isSelectedDay(day, selectedDate) ? ' selected' : '')
}
onClick={() => onDateClick(day)}
{...styles}
>
{...styles}>
{day.month !== 0
? !isNullOrUndefined(props.dateBoxDisabledTxt)
? props.dateBoxDisabledTxt
Expand Down

0 comments on commit e472549

Please sign in to comment.