react-calendar
react-calendar copied to clipboard
Render Tile as div when there is no onClick
This PR renders div
instead of button
when onClick
method is not provided
I will fix tests at the evening...
I'm pretty sure Tile has to always be a button, because otherwise you can't select a tile. onClick will always be defined.
Ok, so how can I render a calendar without any selection functionality?
BTW, I'm using only the MonthView in my app, so it can be rendered without onClick
I gave this a thought and this could work, provided that we won't have any onClick passed to tiles, and this at the moment is always happening. Even if drillDown is not available (like on MonthView), there will be onChange passed. That's not good :( We would need to rethink some other areas of this package.