hypeserver / react-date-range

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

[feat] Added Day Number Color prop to ranges #383

Open DrewVartanian opened 4 years ago

DrewVartanian commented 4 years ago

Subject of the issue

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.

[BUG] Bug Reproduce Steps

N/A

[BUG] Expected behaviour

N/A

Environment

Package Version: 1.0.3 React version: N/A Node version: N/A Browser: N/A

DrewVartanian commented 4 years ago

Addressed in PR #384

keremciu commented 4 years ago

@DrewVartanian I look through PR and would like to go for acceptance part but can you provide some screenshots?

DrewVartanian commented 4 years ago

@DrewVartanian I look through PR and would like to go for acceptance part but can you provide some screenshots?

@keremciu Sure thing! I added an example to src/components/DateRangePicker/README.md, so that it can be seen on a yarn start. To add a day number color to a range, you just add the property to the range arguments, like shown below:

Screen Shot 2020-07-01 at 11 57 02 AM

In this case, we are changing the day number color to black, which can be seen on the yellow range here:

Screen Shot 2020-07-01 at 11 58 31 AM

Let me know if there is anything else you need!

DrewVartanian commented 4 years ago

@keremciu I wanted to check on the status of this PR. This is something I would love to start using in an official release, so if there is anything I can do to help facilitate the review, please let me know.

keremciu commented 4 years ago

@DrewVartanian It looks clean! I'll ask for another review and I'd like to make an offical release with another update related this one(https://github.com/date-fns/date-fns/blob/master/docs/webpack.md)

DrewVartanian commented 4 years ago

Hi @keremciu . Just checking in again on this Issue and the corresponding PR #384 . Do you know when the next release is planned?