Skip to content

Commit

Permalink
Merge pull request #89 from oportojca/fix-overlapped-header
Browse files Browse the repository at this point in the history
Fix to overlapped header in version 0.3.1.
  • Loading branch information
acro5piano committed May 9, 2020
2 parents 342ade1 + 74db874 commit 2b2b54b
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions src/CalendarHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,30 +40,28 @@ export const CalendarHeader = React.memo(
disabled={onPressDateHeader === undefined}
key={date.toString()}
>
<View style={{ flex: 1, paddingTop: 2 }}>
<View style={{ height: cellHeight, justifyContent: 'space-between' }}>
<Text style={[commonStyles.guideText, _isToday && { color: PRIMARY_COLOR }]}>
{date.format('ddd')}
<View style={{ height: cellHeight, justifyContent: 'space-between' }}>
<Text style={[commonStyles.guideText, _isToday && { color: PRIMARY_COLOR }]}>
{date.format('ddd')}
</Text>
<View style={_isToday && styles.todayWrap}>
<Text style={[styles.dateText, _isToday && { color: '#fff' }]}>
{date.format('D')}
</Text>
<View style={_isToday && styles.todayWrap}>
<Text style={[styles.dateText, _isToday && { color: '#fff' }]}>
{date.format('D')}
</Text>
</View>
</View>
<View style={[commonStyles.dateCell, { height: cellHeight }]}>
{allDayEvents.map((event) => {
if (!event.start.isSame(date, 'day')) {
return null
}
return (
<View style={commonStyles.eventCell}>
<Text style={commonStyles.eventTitle}>{event.title}</Text>
</View>
)
})}
</View>
</View>
<View style={[commonStyles.dateCell, { height: cellHeight }]}>
{allDayEvents.map((event) => {
if (!event.start.isSame(date, 'day')) {
return null
}
return (
<View style={commonStyles.eventCell}>
<Text style={commonStyles.eventTitle}>{event.title}</Text>
</View>
)
})}
</View>
</TouchableOpacity>
)
})}
Expand Down

0 comments on commit 2b2b54b

Please sign in to comment.