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

Render Tile as div when there is no onClick #221

Open
wants to merge 137 commits into
base: main
Choose a base branch
from

Conversation

felixmosh
Copy link

@felixmosh felixmosh commented Jul 30, 2019

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

@felixmosh
Copy link
Author

I will fix tests at the evening...

@wojtekmaj
Copy link
Owner

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

@felixmosh
Copy link
Author

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

@felixmosh
Copy link
Author

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

@wojtekmaj
Copy link
Owner

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 and others added 20 commits November 8, 2020 10:49
* [breaking] Remove react-lifecycles-compat polyfill

* [breaking] Bump minimum React version to 16.3
* Implement defaultValue, defaultView, defaultActiveStartDate
* Add onViewChange callback
* Rename onActiveDateChange to onActiveStartDateChange
* Prioritize activeStartDate over value when getting default active start date
… custom function (wojtekmaj#241)

Fix an issue where Navigation for century view, decade view and year view would not have titles properly localized in th-TH locale
Fix an issue where Decade and Year tiles would not have labels properly localized in th-TH locale
Add support for custom formatYear function
Add new tests for formatting tiles

Fixes wojtekmaj#238
* Implement showDoubleView

* Fix tests for Navigation component

* Add unit tests for showDoubleView
* Add makeGetRange helper

* Add isValidDate helper

* Fixup makeGetRange

* Fix test names

* More compressed formatting of switch

* Add makeGetEdgeOfNeighbor helper

* Add docs

* Add makeGetEdgeOfNeighborMonth helper

* Remove getDifferentMonth function

* Add comments

* Add makeGetEnd helper

* Refactor toYearLabel
@wojtekmaj wojtekmaj force-pushed the main branch 4 times, most recently from cef9c7c to cd7ef12 Compare March 2, 2023 08:38
@wojtekmaj wojtekmaj force-pushed the main branch 3 times, most recently from 0f9c665 to 88f5da5 Compare April 5, 2023 09:49
@wojtekmaj wojtekmaj force-pushed the main branch 3 times, most recently from 1f10b65 to 0c5a8da Compare July 27, 2023 21:19
@wojtekmaj wojtekmaj force-pushed the main branch 2 times, most recently from dc4fd25 to a8c5ad5 Compare July 9, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants