Skip to content

Commit

Permalink
updating selected day style
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffrey Drakos authored and Jeffrey Drakos committed Nov 18, 2020
1 parent 20264bc commit 6b81df7
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/CalendarDay.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,24 @@ class CalendarDay extends Component {
];
}
if (this.state.selected) {
dateNameStyle = [styles.dateName, this.props.highlightDateNameStyle];
dateNumberStyle = [
styles.dateNumber,
this.props.highlightDateNumberStyle
];
// This is a very poorly coded fix. But need to update this calendar soon. So keeping it verbose and clear
if (this.props.highlightDateNameStyle) {
dateNameStyle = [styles.dateName, this.props.highlightDateNameStyle];
} else {
dateNameStyle = [styles.dateName];
}

if (this.props.highlightDateNumberStyle) {
dateNumberStyle = [
styles.dateNumber,
...this.props.highlightDateNumberStyle
];
} else {
dateNumberStyle = [
styles.dateNumber
];
}

}
}

Expand Down

0 comments on commit 6b81df7

Please sign in to comment.