Feature #4091 - Make the Calendar Icon clickable#4417
Merged
martijnrusschen merged 4 commits intoHacker0x01:mainfrom Dec 19, 2023
Merged
Feature #4091 - Make the Calendar Icon clickable#4417martijnrusschen merged 4 commits intoHacker0x01:mainfrom
martijnrusschen merged 4 commits intoHacker0x01:mainfrom
Conversation
added 4 commits
December 18, 2023 14:41
Make the calendar icon clickable that helps to toggle the open status of the calendar. Added new test cases to validate the new feature and updated the existing test case of checking the calendar icon class to make the new feature. Closes Hacker0x01#4091
…mponent Attach the onClick listener on the custom calendar icon component without overriding it's existing onClick listener and call both the event handlers based on their existence Closes Hacker0x01#4091
…ggleCalendarOnIconClick Set the onClick to the <CalendarIcon /> component only when toggleCalendarOnIconClick is set Closes Hacker0x01#4091
Added a documentation to demonstrate the usage of toggleCalendarOnIconClick prop to toggle the reactCalendar open status
There was a problem hiding this comment.
✅ This pull request was sent to the PullRequest network.
@balajis-qb you can click here to see the review status or cancel the code review job.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4417 +/- ##
==========================================
+ Coverage 95.28% 95.30% +0.02%
==========================================
Files 28 28
Lines 2479 2491 +12
Branches 1020 1024 +4
==========================================
+ Hits 2362 2374 +12
Misses 117 117 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Looks to add the described toggle to make the calendar icon clickable. I see no issues that would prevent this from moving forward
Reviewed with ❤️ by PullRequest
Member
|
Looks good, thanks for implementing this! |
Contributor
Author
|
Thank you |
Brooooooklyn
referenced
this pull request
in toeverything/AFFiNE
Jan 31, 2024
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [react-datepicker](https://togithub.com/Hacker0x01/react-datepicker) | [`^4.20.0` -> `^5.0.0`](https://renovatebot.com/diffs/npm/react-datepicker/4.23.0/5.1.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>Hacker0x01/react-datepicker (react-datepicker)</summary> ### [`v5.1.0`](https://togithub.com/Hacker0x01/react-datepicker/compare/v5.0.0...v5.1.0) [Compare Source](https://togithub.com/Hacker0x01/react-datepicker/compare/v5.0.0...v5.1.0) ### [`v5.0.0`](https://togithub.com/Hacker0x01/react-datepicker/releases/tag/v5.0.0): 5.0.0 [Compare Source](https://togithub.com/Hacker0x01/react-datepicker/compare/v4.25.0...v5.0.0) #### Breaking changes - Migrate from Popper.js to Floating-UI by [@​G07cha](https://togithub.com/G07cha) in [https://github.com/Hacker0x01/react-datepicker/pull/4393](https://togithub.com/Hacker0x01/react-datepicker/pull/4393) #### What's Changed - 🐛 FIX: readability-isMonthinRange by [@​mary139](https://togithub.com/mary139) in [https://github.com/Hacker0x01/react-datepicker/pull/4421](https://togithub.com/Hacker0x01/react-datepicker/pull/4421) - Fix [#​4431](https://togithub.com/Hacker0x01/react-datepicker/issues/4431): Update the excludedDate to match the year to check of the isYearDisabled by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4432](https://togithub.com/Hacker0x01/react-datepicker/pull/4432) - Fix [#​4420](https://togithub.com/Hacker0x01/react-datepicker/issues/4420): Update home key and end key navigation in Calendar component by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4430](https://togithub.com/Hacker0x01/react-datepicker/pull/4430) - Document [#​4420](https://togithub.com/Hacker0x01/react-datepicker/issues/4420): 📝 Update the behavior of Home Key and End Key in the README file by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4438](https://togithub.com/Hacker0x01/react-datepicker/pull/4438) - Fix [#​4076](https://togithub.com/Hacker0x01/react-datepicker/issues/4076): Trigger onCalendarClose event and onChange even when the same date is selected as the start and the end date in a date range by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4394](https://togithub.com/Hacker0x01/react-datepicker/pull/4394) - Excluded dates message by [@​dvelazquez1282](https://togithub.com/dvelazquez1282) in [https://github.com/Hacker0x01/react-datepicker/pull/4437](https://togithub.com/Hacker0x01/react-datepicker/pull/4437) - Fix [#​4456](https://togithub.com/Hacker0x01/react-datepicker/issues/4456): Add shift+pageUp key and shift+pageDown key navigation in Calendar component by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4457](https://togithub.com/Hacker0x01/react-datepicker/pull/4457) - Fix options passed to date-fns/format by [@​emilecantin](https://togithub.com/emilecantin) in [https://github.com/Hacker0x01/react-datepicker/pull/4469](https://togithub.com/Hacker0x01/react-datepicker/pull/4469) #### New Contributors - [@​mary139](https://togithub.com/mary139) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4421](https://togithub.com/Hacker0x01/react-datepicker/pull/4421) - [@​G07cha](https://togithub.com/G07cha) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4393](https://togithub.com/Hacker0x01/react-datepicker/pull/4393) - [@​dvelazquez1282](https://togithub.com/dvelazquez1282) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4437](https://togithub.com/Hacker0x01/react-datepicker/pull/4437) - [@​emilecantin](https://togithub.com/emilecantin) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4469](https://togithub.com/Hacker0x01/react-datepicker/pull/4469) **Full Changelog**: Hacker0x01/react-datepicker@v4.25.0...v5.0.0 ### [`v4.25.0`](https://togithub.com/Hacker0x01/react-datepicker/releases/tag/v4.25.0): 4.25.0 [Compare Source](https://togithub.com/Hacker0x01/react-datepicker/compare/v4.24.0...v4.25.0) #### What's Changed - feature: Add day parameter to renderMonthContent function by [@​omarhoumz](https://togithub.com/omarhoumz) in [https://github.com/Hacker0x01/react-datepicker/pull/4405](https://togithub.com/Hacker0x01/react-datepicker/pull/4405) - Update 'Local Development' instruction of README.md by [@​raceStarter](https://togithub.com/raceStarter) in [https://github.com/Hacker0x01/react-datepicker/pull/4391](https://togithub.com/Hacker0x01/react-datepicker/pull/4391) - Feature [#​4091](https://togithub.com/Hacker0x01/react-datepicker/issues/4091) - Make the Calendar Icon clickable by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4417](https://togithub.com/Hacker0x01/react-datepicker/pull/4417) #### New Contributors - [@​omarhoumz](https://togithub.com/omarhoumz) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4405](https://togithub.com/Hacker0x01/react-datepicker/pull/4405) - [@​raceStarter](https://togithub.com/raceStarter) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4391](https://togithub.com/Hacker0x01/react-datepicker/pull/4391) **Full Changelog**: Hacker0x01/react-datepicker@v4.24.0...v4.25.0 ### [`v4.24.0`](https://togithub.com/Hacker0x01/react-datepicker/releases/tag/v4.24.0): 4.24.0 [Compare Source](https://togithub.com/Hacker0x01/react-datepicker/compare/v4.23.0...v4.24.0) #### What's Changed - containerRef div shouldnt affect styling by [@​joaopaulo-capy](https://togithub.com/joaopaulo-capy) in [https://github.com/Hacker0x01/react-datepicker/pull/4384](https://togithub.com/Hacker0x01/react-datepicker/pull/4384) - Fix: reflect the `holidays` prop change by [@​shimech](https://togithub.com/shimech) in [https://github.com/Hacker0x01/react-datepicker/pull/4373](https://togithub.com/Hacker0x01/react-datepicker/pull/4373) - Disable clear button when the component is disabled by [@​Rafatcb](https://togithub.com/Rafatcb) in [https://github.com/Hacker0x01/react-datepicker/pull/4392](https://togithub.com/Hacker0x01/react-datepicker/pull/4392) #### New Contributors - [@​joaopaulo-capy](https://togithub.com/joaopaulo-capy) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4384](https://togithub.com/Hacker0x01/react-datepicker/pull/4384) - [@​shimech](https://togithub.com/shimech) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4373](https://togithub.com/Hacker0x01/react-datepicker/pull/4373) - [@​Rafatcb](https://togithub.com/Rafatcb) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4392](https://togithub.com/Hacker0x01/react-datepicker/pull/4392) **Full Changelog**: Hacker0x01/react-datepicker@v4.23.0...v4.24.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE1My4yIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
Brooooooklyn
referenced
this pull request
in toeverything/AFFiNE
Jan 31, 2024
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [react-datepicker](https://togithub.com/Hacker0x01/react-datepicker) | [`^4.20.0` -> `^5.0.0`](https://renovatebot.com/diffs/npm/react-datepicker/4.23.0/5.1.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>Hacker0x01/react-datepicker (react-datepicker)</summary> ### [`v5.1.0`](https://togithub.com/Hacker0x01/react-datepicker/compare/v5.0.0...v5.1.0) [Compare Source](https://togithub.com/Hacker0x01/react-datepicker/compare/v5.0.0...v5.1.0) ### [`v5.0.0`](https://togithub.com/Hacker0x01/react-datepicker/releases/tag/v5.0.0): 5.0.0 [Compare Source](https://togithub.com/Hacker0x01/react-datepicker/compare/v4.25.0...v5.0.0) #### Breaking changes - Migrate from Popper.js to Floating-UI by [@​G07cha](https://togithub.com/G07cha) in [https://github.com/Hacker0x01/react-datepicker/pull/4393](https://togithub.com/Hacker0x01/react-datepicker/pull/4393) #### What's Changed - 🐛 FIX: readability-isMonthinRange by [@​mary139](https://togithub.com/mary139) in [https://github.com/Hacker0x01/react-datepicker/pull/4421](https://togithub.com/Hacker0x01/react-datepicker/pull/4421) - Fix [#​4431](https://togithub.com/Hacker0x01/react-datepicker/issues/4431): Update the excludedDate to match the year to check of the isYearDisabled by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4432](https://togithub.com/Hacker0x01/react-datepicker/pull/4432) - Fix [#​4420](https://togithub.com/Hacker0x01/react-datepicker/issues/4420): Update home key and end key navigation in Calendar component by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4430](https://togithub.com/Hacker0x01/react-datepicker/pull/4430) - Document [#​4420](https://togithub.com/Hacker0x01/react-datepicker/issues/4420): 📝 Update the behavior of Home Key and End Key in the README file by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4438](https://togithub.com/Hacker0x01/react-datepicker/pull/4438) - Fix [#​4076](https://togithub.com/Hacker0x01/react-datepicker/issues/4076): Trigger onCalendarClose event and onChange even when the same date is selected as the start and the end date in a date range by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4394](https://togithub.com/Hacker0x01/react-datepicker/pull/4394) - Excluded dates message by [@​dvelazquez1282](https://togithub.com/dvelazquez1282) in [https://github.com/Hacker0x01/react-datepicker/pull/4437](https://togithub.com/Hacker0x01/react-datepicker/pull/4437) - Fix [#​4456](https://togithub.com/Hacker0x01/react-datepicker/issues/4456): Add shift+pageUp key and shift+pageDown key navigation in Calendar component by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4457](https://togithub.com/Hacker0x01/react-datepicker/pull/4457) - Fix options passed to date-fns/format by [@​emilecantin](https://togithub.com/emilecantin) in [https://github.com/Hacker0x01/react-datepicker/pull/4469](https://togithub.com/Hacker0x01/react-datepicker/pull/4469) #### New Contributors - [@​mary139](https://togithub.com/mary139) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4421](https://togithub.com/Hacker0x01/react-datepicker/pull/4421) - [@​G07cha](https://togithub.com/G07cha) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4393](https://togithub.com/Hacker0x01/react-datepicker/pull/4393) - [@​dvelazquez1282](https://togithub.com/dvelazquez1282) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4437](https://togithub.com/Hacker0x01/react-datepicker/pull/4437) - [@​emilecantin](https://togithub.com/emilecantin) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4469](https://togithub.com/Hacker0x01/react-datepicker/pull/4469) **Full Changelog**: Hacker0x01/react-datepicker@v4.25.0...v5.0.0 ### [`v4.25.0`](https://togithub.com/Hacker0x01/react-datepicker/releases/tag/v4.25.0): 4.25.0 [Compare Source](https://togithub.com/Hacker0x01/react-datepicker/compare/v4.24.0...v4.25.0) #### What's Changed - feature: Add day parameter to renderMonthContent function by [@​omarhoumz](https://togithub.com/omarhoumz) in [https://github.com/Hacker0x01/react-datepicker/pull/4405](https://togithub.com/Hacker0x01/react-datepicker/pull/4405) - Update 'Local Development' instruction of README.md by [@​raceStarter](https://togithub.com/raceStarter) in [https://github.com/Hacker0x01/react-datepicker/pull/4391](https://togithub.com/Hacker0x01/react-datepicker/pull/4391) - Feature [#​4091](https://togithub.com/Hacker0x01/react-datepicker/issues/4091) - Make the Calendar Icon clickable by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4417](https://togithub.com/Hacker0x01/react-datepicker/pull/4417) #### New Contributors - [@​omarhoumz](https://togithub.com/omarhoumz) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4405](https://togithub.com/Hacker0x01/react-datepicker/pull/4405) - [@​raceStarter](https://togithub.com/raceStarter) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4391](https://togithub.com/Hacker0x01/react-datepicker/pull/4391) **Full Changelog**: Hacker0x01/react-datepicker@v4.24.0...v4.25.0 ### [`v4.24.0`](https://togithub.com/Hacker0x01/react-datepicker/releases/tag/v4.24.0): 4.24.0 [Compare Source](https://togithub.com/Hacker0x01/react-datepicker/compare/v4.23.0...v4.24.0) #### What's Changed - containerRef div shouldnt affect styling by [@​joaopaulo-capy](https://togithub.com/joaopaulo-capy) in [https://github.com/Hacker0x01/react-datepicker/pull/4384](https://togithub.com/Hacker0x01/react-datepicker/pull/4384) - Fix: reflect the `holidays` prop change by [@​shimech](https://togithub.com/shimech) in [https://github.com/Hacker0x01/react-datepicker/pull/4373](https://togithub.com/Hacker0x01/react-datepicker/pull/4373) - Disable clear button when the component is disabled by [@​Rafatcb](https://togithub.com/Rafatcb) in [https://github.com/Hacker0x01/react-datepicker/pull/4392](https://togithub.com/Hacker0x01/react-datepicker/pull/4392) #### New Contributors - [@​joaopaulo-capy](https://togithub.com/joaopaulo-capy) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4384](https://togithub.com/Hacker0x01/react-datepicker/pull/4384) - [@​shimech](https://togithub.com/shimech) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4373](https://togithub.com/Hacker0x01/react-datepicker/pull/4373) - [@​Rafatcb](https://togithub.com/Rafatcb) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4392](https://togithub.com/Hacker0x01/react-datepicker/pull/4392) **Full Changelog**: Hacker0x01/react-datepicker@v4.23.0...v4.24.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE1My4yIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
Brooooooklyn
referenced
this pull request
in toeverything/AFFiNE
Feb 1, 2024
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [react-datepicker](https://togithub.com/Hacker0x01/react-datepicker) | [`^4.20.0` -> `^5.0.0`](https://renovatebot.com/diffs/npm/react-datepicker/4.23.0/5.1.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>Hacker0x01/react-datepicker (react-datepicker)</summary> ### [`v5.1.0`](https://togithub.com/Hacker0x01/react-datepicker/compare/v5.0.0...v5.1.0) [Compare Source](https://togithub.com/Hacker0x01/react-datepicker/compare/v5.0.0...v5.1.0) ### [`v5.0.0`](https://togithub.com/Hacker0x01/react-datepicker/releases/tag/v5.0.0): 5.0.0 [Compare Source](https://togithub.com/Hacker0x01/react-datepicker/compare/v4.25.0...v5.0.0) #### Breaking changes - Migrate from Popper.js to Floating-UI by [@​G07cha](https://togithub.com/G07cha) in [https://github.com/Hacker0x01/react-datepicker/pull/4393](https://togithub.com/Hacker0x01/react-datepicker/pull/4393) #### What's Changed - 🐛 FIX: readability-isMonthinRange by [@​mary139](https://togithub.com/mary139) in [https://github.com/Hacker0x01/react-datepicker/pull/4421](https://togithub.com/Hacker0x01/react-datepicker/pull/4421) - Fix [#​4431](https://togithub.com/Hacker0x01/react-datepicker/issues/4431): Update the excludedDate to match the year to check of the isYearDisabled by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4432](https://togithub.com/Hacker0x01/react-datepicker/pull/4432) - Fix [#​4420](https://togithub.com/Hacker0x01/react-datepicker/issues/4420): Update home key and end key navigation in Calendar component by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4430](https://togithub.com/Hacker0x01/react-datepicker/pull/4430) - Document [#​4420](https://togithub.com/Hacker0x01/react-datepicker/issues/4420): 📝 Update the behavior of Home Key and End Key in the README file by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4438](https://togithub.com/Hacker0x01/react-datepicker/pull/4438) - Fix [#​4076](https://togithub.com/Hacker0x01/react-datepicker/issues/4076): Trigger onCalendarClose event and onChange even when the same date is selected as the start and the end date in a date range by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4394](https://togithub.com/Hacker0x01/react-datepicker/pull/4394) - Excluded dates message by [@​dvelazquez1282](https://togithub.com/dvelazquez1282) in [https://github.com/Hacker0x01/react-datepicker/pull/4437](https://togithub.com/Hacker0x01/react-datepicker/pull/4437) - Fix [#​4456](https://togithub.com/Hacker0x01/react-datepicker/issues/4456): Add shift+pageUp key and shift+pageDown key navigation in Calendar component by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4457](https://togithub.com/Hacker0x01/react-datepicker/pull/4457) - Fix options passed to date-fns/format by [@​emilecantin](https://togithub.com/emilecantin) in [https://github.com/Hacker0x01/react-datepicker/pull/4469](https://togithub.com/Hacker0x01/react-datepicker/pull/4469) #### New Contributors - [@​mary139](https://togithub.com/mary139) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4421](https://togithub.com/Hacker0x01/react-datepicker/pull/4421) - [@​G07cha](https://togithub.com/G07cha) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4393](https://togithub.com/Hacker0x01/react-datepicker/pull/4393) - [@​dvelazquez1282](https://togithub.com/dvelazquez1282) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4437](https://togithub.com/Hacker0x01/react-datepicker/pull/4437) - [@​emilecantin](https://togithub.com/emilecantin) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4469](https://togithub.com/Hacker0x01/react-datepicker/pull/4469) **Full Changelog**: Hacker0x01/react-datepicker@v4.25.0...v5.0.0 ### [`v4.25.0`](https://togithub.com/Hacker0x01/react-datepicker/releases/tag/v4.25.0): 4.25.0 [Compare Source](https://togithub.com/Hacker0x01/react-datepicker/compare/v4.24.0...v4.25.0) #### What's Changed - feature: Add day parameter to renderMonthContent function by [@​omarhoumz](https://togithub.com/omarhoumz) in [https://github.com/Hacker0x01/react-datepicker/pull/4405](https://togithub.com/Hacker0x01/react-datepicker/pull/4405) - Update 'Local Development' instruction of README.md by [@​raceStarter](https://togithub.com/raceStarter) in [https://github.com/Hacker0x01/react-datepicker/pull/4391](https://togithub.com/Hacker0x01/react-datepicker/pull/4391) - Feature [#​4091](https://togithub.com/Hacker0x01/react-datepicker/issues/4091) - Make the Calendar Icon clickable by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4417](https://togithub.com/Hacker0x01/react-datepicker/pull/4417) #### New Contributors - [@​omarhoumz](https://togithub.com/omarhoumz) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4405](https://togithub.com/Hacker0x01/react-datepicker/pull/4405) - [@​raceStarter](https://togithub.com/raceStarter) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4391](https://togithub.com/Hacker0x01/react-datepicker/pull/4391) **Full Changelog**: Hacker0x01/react-datepicker@v4.24.0...v4.25.0 ### [`v4.24.0`](https://togithub.com/Hacker0x01/react-datepicker/releases/tag/v4.24.0): 4.24.0 [Compare Source](https://togithub.com/Hacker0x01/react-datepicker/compare/v4.23.0...v4.24.0) #### What's Changed - containerRef div shouldnt affect styling by [@​joaopaulo-capy](https://togithub.com/joaopaulo-capy) in [https://github.com/Hacker0x01/react-datepicker/pull/4384](https://togithub.com/Hacker0x01/react-datepicker/pull/4384) - Fix: reflect the `holidays` prop change by [@​shimech](https://togithub.com/shimech) in [https://github.com/Hacker0x01/react-datepicker/pull/4373](https://togithub.com/Hacker0x01/react-datepicker/pull/4373) - Disable clear button when the component is disabled by [@​Rafatcb](https://togithub.com/Rafatcb) in [https://github.com/Hacker0x01/react-datepicker/pull/4392](https://togithub.com/Hacker0x01/react-datepicker/pull/4392) #### New Contributors - [@​joaopaulo-capy](https://togithub.com/joaopaulo-capy) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4384](https://togithub.com/Hacker0x01/react-datepicker/pull/4384) - [@​shimech](https://togithub.com/shimech) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4373](https://togithub.com/Hacker0x01/react-datepicker/pull/4373) - [@​Rafatcb](https://togithub.com/Rafatcb) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4392](https://togithub.com/Hacker0x01/react-datepicker/pull/4392) **Full Changelog**: Hacker0x01/react-datepicker@v4.23.0...v4.24.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE1My4yIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
Brooooooklyn
referenced
this pull request
in toeverything/AFFiNE
Feb 1, 2024
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [react-datepicker](https://togithub.com/Hacker0x01/react-datepicker) | [`^4.20.0` -> `^5.0.0`](https://renovatebot.com/diffs/npm/react-datepicker/4.23.0/5.1.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>Hacker0x01/react-datepicker (react-datepicker)</summary> ### [`v5.1.0`](https://togithub.com/Hacker0x01/react-datepicker/compare/v5.0.0...v5.1.0) [Compare Source](https://togithub.com/Hacker0x01/react-datepicker/compare/v5.0.0...v5.1.0) ### [`v5.0.0`](https://togithub.com/Hacker0x01/react-datepicker/releases/tag/v5.0.0): 5.0.0 [Compare Source](https://togithub.com/Hacker0x01/react-datepicker/compare/v4.25.0...v5.0.0) #### Breaking changes - Migrate from Popper.js to Floating-UI by [@​G07cha](https://togithub.com/G07cha) in [https://github.com/Hacker0x01/react-datepicker/pull/4393](https://togithub.com/Hacker0x01/react-datepicker/pull/4393) #### What's Changed - 🐛 FIX: readability-isMonthinRange by [@​mary139](https://togithub.com/mary139) in [https://github.com/Hacker0x01/react-datepicker/pull/4421](https://togithub.com/Hacker0x01/react-datepicker/pull/4421) - Fix [#​4431](https://togithub.com/Hacker0x01/react-datepicker/issues/4431): Update the excludedDate to match the year to check of the isYearDisabled by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4432](https://togithub.com/Hacker0x01/react-datepicker/pull/4432) - Fix [#​4420](https://togithub.com/Hacker0x01/react-datepicker/issues/4420): Update home key and end key navigation in Calendar component by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4430](https://togithub.com/Hacker0x01/react-datepicker/pull/4430) - Document [#​4420](https://togithub.com/Hacker0x01/react-datepicker/issues/4420): 📝 Update the behavior of Home Key and End Key in the README file by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4438](https://togithub.com/Hacker0x01/react-datepicker/pull/4438) - Fix [#​4076](https://togithub.com/Hacker0x01/react-datepicker/issues/4076): Trigger onCalendarClose event and onChange even when the same date is selected as the start and the end date in a date range by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4394](https://togithub.com/Hacker0x01/react-datepicker/pull/4394) - Excluded dates message by [@​dvelazquez1282](https://togithub.com/dvelazquez1282) in [https://github.com/Hacker0x01/react-datepicker/pull/4437](https://togithub.com/Hacker0x01/react-datepicker/pull/4437) - Fix [#​4456](https://togithub.com/Hacker0x01/react-datepicker/issues/4456): Add shift+pageUp key and shift+pageDown key navigation in Calendar component by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4457](https://togithub.com/Hacker0x01/react-datepicker/pull/4457) - Fix options passed to date-fns/format by [@​emilecantin](https://togithub.com/emilecantin) in [https://github.com/Hacker0x01/react-datepicker/pull/4469](https://togithub.com/Hacker0x01/react-datepicker/pull/4469) #### New Contributors - [@​mary139](https://togithub.com/mary139) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4421](https://togithub.com/Hacker0x01/react-datepicker/pull/4421) - [@​G07cha](https://togithub.com/G07cha) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4393](https://togithub.com/Hacker0x01/react-datepicker/pull/4393) - [@​dvelazquez1282](https://togithub.com/dvelazquez1282) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4437](https://togithub.com/Hacker0x01/react-datepicker/pull/4437) - [@​emilecantin](https://togithub.com/emilecantin) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4469](https://togithub.com/Hacker0x01/react-datepicker/pull/4469) **Full Changelog**: Hacker0x01/react-datepicker@v4.25.0...v5.0.0 ### [`v4.25.0`](https://togithub.com/Hacker0x01/react-datepicker/releases/tag/v4.25.0): 4.25.0 [Compare Source](https://togithub.com/Hacker0x01/react-datepicker/compare/v4.24.0...v4.25.0) #### What's Changed - feature: Add day parameter to renderMonthContent function by [@​omarhoumz](https://togithub.com/omarhoumz) in [https://github.com/Hacker0x01/react-datepicker/pull/4405](https://togithub.com/Hacker0x01/react-datepicker/pull/4405) - Update 'Local Development' instruction of README.md by [@​raceStarter](https://togithub.com/raceStarter) in [https://github.com/Hacker0x01/react-datepicker/pull/4391](https://togithub.com/Hacker0x01/react-datepicker/pull/4391) - Feature [#​4091](https://togithub.com/Hacker0x01/react-datepicker/issues/4091) - Make the Calendar Icon clickable by [@​balajis-qb](https://togithub.com/balajis-qb) in [https://github.com/Hacker0x01/react-datepicker/pull/4417](https://togithub.com/Hacker0x01/react-datepicker/pull/4417) #### New Contributors - [@​omarhoumz](https://togithub.com/omarhoumz) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4405](https://togithub.com/Hacker0x01/react-datepicker/pull/4405) - [@​raceStarter](https://togithub.com/raceStarter) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4391](https://togithub.com/Hacker0x01/react-datepicker/pull/4391) **Full Changelog**: Hacker0x01/react-datepicker@v4.24.0...v4.25.0 ### [`v4.24.0`](https://togithub.com/Hacker0x01/react-datepicker/releases/tag/v4.24.0): 4.24.0 [Compare Source](https://togithub.com/Hacker0x01/react-datepicker/compare/v4.23.0...v4.24.0) #### What's Changed - containerRef div shouldnt affect styling by [@​joaopaulo-capy](https://togithub.com/joaopaulo-capy) in [https://github.com/Hacker0x01/react-datepicker/pull/4384](https://togithub.com/Hacker0x01/react-datepicker/pull/4384) - Fix: reflect the `holidays` prop change by [@​shimech](https://togithub.com/shimech) in [https://github.com/Hacker0x01/react-datepicker/pull/4373](https://togithub.com/Hacker0x01/react-datepicker/pull/4373) - Disable clear button when the component is disabled by [@​Rafatcb](https://togithub.com/Rafatcb) in [https://github.com/Hacker0x01/react-datepicker/pull/4392](https://togithub.com/Hacker0x01/react-datepicker/pull/4392) #### New Contributors - [@​joaopaulo-capy](https://togithub.com/joaopaulo-capy) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4384](https://togithub.com/Hacker0x01/react-datepicker/pull/4384) - [@​shimech](https://togithub.com/shimech) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4373](https://togithub.com/Hacker0x01/react-datepicker/pull/4373) - [@​Rafatcb](https://togithub.com/Rafatcb) made their first contribution in [https://github.com/Hacker0x01/react-datepicker/pull/4392](https://togithub.com/Hacker0x01/react-datepicker/pull/4392) **Full Changelog**: Hacker0x01/react-datepicker@v4.23.0...v4.24.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE1My4yIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4091
Description
This PR introduces a feature to the
<DatePicker />component, allowing the open status of the calendar to be toggled upon clicking the calendar icon. The behavior is controlled by a new proptoggleCalendarOnIconClick, which can be set to enable or disable this functionality. By default, this functionality is disabled.Changes Made
toggleCalendarOnIconClickprop to control the calendar toggle behavior.onClickevent handler for based on the existence of thetoggleCalendarOnIconClickproponClickevent even on the custom icon component without overriding the user setonClicklistener of it based on the existence oftoggleCalendarOnIconClickMotivation and Context
The motivation behind this change is to provide users with the ability to control the calendar's open status directly from the calendar icon, offering more flexibility in the component's usage.