hypeserver / react-date-range

A React component for choosing dates and date ranges.
MIT License
2.59k stars 672 forks source link

Added Day Number Color prop to ranges #384

Open DrewVartanian opened 4 years ago

DrewVartanian commented 4 years ago

Types of changes

What types of changes does your code introduce?

Put an x in the boxes that apply

Description

Currently, it seems the only way to overwrite the color of the date number text in a range is to use CSS, and any change will be applied to all ranges. This can lead to an issue if someone wants to apply different text colors to different ranges. This can come up when one range's color is very bright, necessitating a dark text color, and one range is very dark, necessitating a bright text color. In addition, it is nice to be able to set the text color with a prop, rather than having to overwrite/modify the default CSS.

This PR adds dayNumberColor as a prop on the ranges object and applies that color to the day number text of any date shown in that range.

Related Issue: #383

kamyar commented 3 years ago

Hi, can you take a look at #483 and see if it would cover this usecase also?

thank you