We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b63508 commit 828ed4aCopy full SHA for 828ed4a
src/calendar-list/index.tsx
@@ -146,8 +146,11 @@ const CalendarList = (props: CalendarListProps, ref: any) => {
146
147
useDidUpdate(() => {
148
const currMont = currentMonth?.clone();
149
- onMonthChange?.(xdateToData(currMont));
150
- onVisibleMonthsChange?.([xdateToData(currMont)]);
+ if (currMont) {
+ const data = xdateToData(currMont);
151
+ onMonthChange?.(data);
152
+ onVisibleMonthsChange?.([data]);
153
+ }
154
}, [currentMonth]);
155
156
const scrollToDay = (date: XDate | string, offset: number, animated: boolean) => {
0 commit comments