react-calendar icon indicating copy to clipboard operation
react-calendar copied to clipboard

Render Tile as div when there is no onClick

Open felixmosh opened this issue 4 years ago • 5 comments

This PR renders div instead of button when onClick method is not provided

felixmosh avatar Jul 30 '19 08:07 felixmosh

I will fix tests at the evening...

felixmosh avatar Jul 30 '19 08:07 felixmosh

I'm pretty sure Tile has to always be a button, because otherwise you can't select a tile. onClick will always be defined.

wojtekmaj avatar Jul 30 '19 10:07 wojtekmaj

Ok, so how can I render a calendar without any selection functionality?

felixmosh avatar Jul 30 '19 11:07 felixmosh

BTW, I'm using only the MonthView in my app, so it can be rendered without onClick

felixmosh avatar Jul 30 '19 11:07 felixmosh

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.

wojtekmaj avatar Nov 16 '19 10:11 wojtekmaj