Skip to content

Commit b34d385

Browse files
committed
ExpandableCalendar - fix onDayPress not closing calendar
1 parent 77c616e commit b34d385

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/calendar-list/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ const CalendarList = (props: CalendarListProps, ref: any) => {
232232
visible={isDateInRange(item)}
233233
/>
234234
);
235-
}, [horizontal, calendarStyle, calendarWidth, testID, getMarkedDatesForItem, isDateInRange]);
235+
}, [horizontal, calendarStyle, calendarWidth, testID, getMarkedDatesForItem, isDateInRange, calendarProps]);
236236

237237
const renderStaticHeader = () => {
238238
if (staticHeader && horizontal) {

src/expandableCalendar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ const ExpandableCalendar = (props: ExpandableCalendarProps) => {
427427
closeCalendar();
428428
}
429429
onDayPress?.(value);
430-
}, [onDayPress, closeOnDayPress, isOpen, numberOfDays]);
430+
}, [onDayPress, closeOnDayPress, closeCalendar, numberOfDaysCondition]);
431431

432432
const onVisibleMonthsChange = useCallback(throttle(
433433
(value: DateData[]) => {

0 commit comments

Comments
 (0)