Skip to content

Commit 0e1a768

Browse files
committed
fix CalendarHeader style for timeline with numberOfdays > 1
1 parent fb9a0fd commit 0e1a768

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/expandableCalendar/index.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,12 @@ const ExpandableCalendar = (props: ExpandableCalendarProps) => {
543543
);
544544
};
545545

546+
const numberOfDaysHeaderStyle = useMemo(() => {
547+
if (numberOfDays && numberOfDays > 1) {
548+
return {paddingHorizontal: 0};
549+
}
550+
}, [numberOfDays]);
551+
546552
const renderCalendarList = () => {
547553
return (
548554
<CalendarList
@@ -565,6 +571,7 @@ const ExpandableCalendar = (props: ExpandableCalendarProps) => {
565571
renderArrow={_renderArrow}
566572
staticHeader
567573
numberOfDays={numberOfDays}
574+
headerStyle={numberOfDaysHeaderStyle}
568575
timelineLeftInset={timelineLeftInset}
569576
/>
570577
);

0 commit comments

Comments
 (0)