react-native-calendars
react-native-calendars copied to clipboard
Same background color in numbers of calendar and week header
Hi!
First, I hope you a nice day to all.
Description
How to get same background in numbers of calendar and week header
Expected Behavior
Could put the same background color on week days and numbers but different on months.
Screenshots
Actually I only can(know) change the background color of week row:
But I need some like this:
Last image I got it with a absolute position of View component, but when I make scroll, the absolute position of view dont move (obviusly).
How could I change only the background of the week days and numbers of calendar like last screenshoot?
Here my <CalendartList /> code:
<CalendarList
firstDay={1}
markedDates={selectedDays}
onDayPress={_onDayPress}
pastScrollRange={1}
futureScrollRange={1}
scrollEnabled={true}
showScrollIndicator={false}
theme={{
backgroundColor: '#FF7066', // Not change nothing
calendarBackground: 'transparent', // If change it, change all calendar bg
textSectionTitleColor: '#FFF',
selectedDayBackgroundColor: 'transparent',
selectedDayTextColor: '#FFF',
todayTextColor: '#FFF',
todayBackgroundColor: '#FF7066',
dayTextColor: 'gray', //Disabled days
dotColor: '#FF7066',
selectedDotColor: '#FFF',
monthTextColor: '#FFF',
textDayFontWeight: '300',
textMonthFontWeight: 'bold',
textDayHeaderFontWeight: '300',
'stylesheet.calendar.header': {
header: {
flexDirection: 'row',
justifyContent: 'flex-start',
alignItems: 'center',
},
week: {
marginTop: 20,
flexDirection: 'row',
justifyContent: 'space-between',
backgroundColor: 'rgba(125,125,125,0.25)', //Here I can change only the background week days
},
},
textDayFontSize: 14,
textMonthFontSize: 16,
textDayHeaderFontSize: 14,
}}
>
Thanks!!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi again. Any solution?
Thanks!!
Hi again. Any solution?
Thanks!!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Nothing guys? Im trying all to make this changes but impossible
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
As far as i got it should be marked like this ['stylesheet.calendar.header'] and it doesn't has the option for header, only week and if you want to change de color of the main header you code headerStyle out of the theme like
headerStyle={{ backgroundColor: 'black', }} theme={{ ['stylesheet.calendar.header']: { week: { marginTop: 20, flexDirection: 'row', justifyContent: 'space-between', backgroundColor: 'rgba(125,125,125,0.25)', //Here I can change only the background week days }, },...
probably it has to be with markingType: 'custom' and the week color will overlap the headerStyle.
theme={{
stylesheet: {
calendar: {
main: {
container: {
backgroundColor: 'green',
},
},
},
},
}}
Hi again. Any solution?
Thanks!!