react-native-calendars icon indicating copy to clipboard operation
react-native-calendars copied to clipboard

Edit spacing between months in CalendarList

Open NikolakoG opened this issue 2 years ago • 8 comments

I want to reduce the space between the months in CalendarList component but there isnt any prop to handle it.

The current spacing is shown underneath in the photo. image

It happens in all devices/emulators/simulators

The code shown below is used in my app:

<CalendarList calendarStyle={{ paddingLeft: 0, paddingRight: 0, width: '100%', backgroundColor: theme.colors.WHITE }} markingType={'custom'} maxDate={maxDate ? maxDate : undefined} minDate={minDate ? minDate : undefined} markedDates={ dateRange ? { ...defineRange(dateRange.from, dateRange.to) } : { ...marked } } firstDay={1} dayComponent={(props) => <Day dateRange={dateRange} hasSelectedRange={hasSelectedRange} isDateRange={isDateRange} rangeHandler={rangeHandler} onDayPress={onDayPress} {...props} />} customHeader={renderCustomHeader} testID={testID} theme={{ textDayFontFamily: fontFamily.REGULAR, textDayFontSize: 14, calendarBackground: theme.colors.WHITE }} />

NikolakoG avatar Oct 05 '23 09:10 NikolakoG

I second this. Need a way to change the spacing really between all parts of the calendar.

NorseGaud avatar Oct 28 '23 17:10 NorseGaud

when you specify calendarHeight prop, it solves the issue. Example

calendarHeight={300}

f0wu5u avatar Dec 21 '23 10:12 f0wu5u