-
-
Notifications
You must be signed in to change notification settings - Fork 216
Description
Hello.
We were using Next.js 14.2.13 and everything was working as expected. We decided to upgrade our Next.js version to 15.1.6. But it seems that the calendar has stopped working since i upgraded Next.js and it throws strange errors that I can’t figure out how to fix. I get these strange errors anywhere i use this calendar.
Here is the calendar code:
<Calendar
value={value}
onChange={onChange}
minimumDate={minDate}
maximumDate={maximumDate}
colorPrimary='#726B9A'
colorPrimaryLight='#e4e1f7'
calendarClassName={styles.calendar}
locale={calendarLocales}
// calendarClassName="responsive-calendar"
/>
With this, i get this error: TypeError: O is not a function
When i remove locale prop, the error will change to this: TypeError: Cannot read properties of undefined (reading 'weekDays')
I think it doesn't matter how the code is. For example look at this code:
<Calendar
value={null}
onChange={() => {}}
shouldHighlightWeekends
/>
I get this error: TypeError: Cannot read properties of undefined (reading 'weekDays')
As i said, in Next.js 14.2.13 the first code snippet was working correctly. After i upgraded Next.js to 15.1.6, it stopped working and I don't know how to fix the issue.
Thanks for your help.