Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass modifiers to renderDay #237

Closed
davincho opened this issue Dec 2, 2016 · 6 comments
Closed

Pass modifiers to renderDay #237

davincho opened this issue Dec 2, 2016 · 6 comments
Milestone

Comments

@davincho
Copy link

davincho commented Dec 2, 2016

I would need access to modifiers within the renderDay callback. What's about passing not only day but also dayModifers to the callback (see

{this.props.renderDay(day)}
)

Before: {this.props.renderDay(day)}
After: {this.props.renderDay(day, dayModifiers)}

@jirikolarik
Copy link

jirikolarik commented Jan 31, 2017

I'd like to see this feature as well. What do you think @gpbl? It will allow you to render specific content based on modifier. I can create PR if you wish

@gpbl
Copy link
Owner

gpbl commented Feb 9, 2017

I'd like first to understand the use case, as I've in mind a new feature that may help in this direction :)

The modifiers are intended to add a CSS classname to the day cell. What is your case @davincho, @jirikolarik ?

@gpbl gpbl added the discussion label Feb 9, 2017
@jirikolarik
Copy link

jirikolarik commented Feb 10, 2017

If we have dayModifiers passed to renderDay object, we know how that date differentiate between others. For example, if the date is "occupied", we can currently make it grey, green or yellow, but with this information in renderDay method we could also render different content as the actual word "occupied" without checking if the date is occupied again inside the method.

I'll check this new feature, maybe it's something we can utilise for this use case

@gpbl
Copy link
Owner

gpbl commented Feb 10, 2017

Thanks @jirikolarik for the feedback! As this is a simple to implement, it's going to be added in the next minor release!

@davincho
Copy link
Author

Yes having the same use cases as @jirikolarik described. Looking forward for next minor release!

@gpbl gpbl added this to the v4 milestone Feb 10, 2017
@gpbl gpbl closed this as completed in ac9ba6f Feb 10, 2017
@gpbl
Copy link
Owner

gpbl commented Feb 14, 2017

Released as v4.0. It is a major release because of some minor breaking changes – it should be easy to upgrade!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants