I am currently working with the React Datepicker and I am facing an issue where two different styles need to be applied for the current date and a selected date.
Specifically, I have defined a style for the current date as well as a separate style for when a user selects a date.
The problem arises when neither style takes precedence over the other. As a result, when the current date is selected, both colors end up merging together. I am hoping to configure it in a way that when the current date is selected, only the selected date CSS style is applied while ignoring the other style.
https://codesandbox.io/s/blue-bash-32xik?fontsize=14
CSS Styles
.myClassname,
.react-datepicker__day--selected {
background-color: #1648c3 !important;
}
.myClassname,
.react-datepicker__day--today {
border: 2px solid
linear-gradient(
174deg,
rgba(255, 165, 0, 0.7357317927170868) 32%,
rgba(249, 239, 170, 1) 100%
);
border-radius: 0.3rem;
background: linear-gradient(
174deg,
rgba(255, 165, 0, 0.7357317927170868) 32%,
rgba(249, 239, 170, 1) 100%
);
}