Skip to content

Commit e79ae52

Browse files
authored
changed static pageHeight prop to calendarHeight in week calendar (#2197)
1 parent 00c2877 commit e79ae52

File tree

1 file changed

+3
-2
lines changed
  • src/expandableCalendar/WeekCalendar

1 file changed

+3
-2
lines changed

src/expandableCalendar/WeekCalendar/new.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ export interface WeekCalendarProps extends CalendarListProps {
2121
}
2222

2323
const NUMBER_OF_PAGES = 50;
24+
const DEFAULT_PAGE_HEIGHT = 48;
2425

2526
const WeekCalendar = (props: WeekCalendarProps) => {
26-
const {current, firstDay = 0, markedDates, allowShadow = true, hideDayNames, theme, calendarWidth, testID} = props;
27+
const {current, firstDay = 0, markedDates, allowShadow = true, hideDayNames, theme, calendarWidth, calendarHeight = DEFAULT_PAGE_HEIGHT, testID} = props;
2728
const context = useContext(CalendarContext);
2829
const {date, updateSource} = context;
2930
const style = useRef(styleConstructor(theme));
@@ -119,7 +120,7 @@ const WeekCalendar = (props: WeekCalendarProps) => {
119120
extendedState={extraData}
120121
style={style.current.container}
121122
initialPageIndex={NUMBER_OF_PAGES}
122-
pageHeight={48}
123+
pageHeight={calendarHeight}
123124
pageWidth={containerWidth}
124125
onPageChange={onPageChange}
125126
scrollViewProps={{

0 commit comments

Comments
 (0)