Controlling selectingDate from the outside
See original GitHub issueI’m trying to build a date range component that works a bit differently than your example.
This is what it looks like at the moment:
As you can see, the start date is 01/09/2019 and the end date is 02/13/2019. Because those two are separate datepickers, they don’t know about each others selectingDate
.
I was wondering if there’s a way to have:
- a callback when
selectingDate
changes - a prop
selectingDate
that would serve as fallback in caseselectingDate
in state isn’t set.
Basically, I’m trying to control what’s styled as in range while hovering over days.
If that’s okay, I could provide PR for this.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8
Top Results From Across the Web
Prevent Users from Selecting Dates Outside of the Current ...
By default, the Calendar control will show all dates of the current month, as well as some dates in the previous/next month in...
Read more >Insert a date picker - Microsoft Support
Under Insert controls, click Date Picker. In the Date Picker Binding dialog box, select the field in which you want to store the...
Read more >c# - BUG: Can't choose dates on a DatePicker that fall outside ...
F5 and click the Calendar Control, now try to select a date that is outside the taskpane area. No Value Change event fires,...
Read more >Date range control - Looker Studio Help - Google Support
The date range control lets you select the dates you want to see in the report. You can define a custom date range...
Read more ><input type="datetime-local"> - HTML - MDN Web Docs
The control is intended to represent a local date and time, not necessarily the user's local date and time. In other words, an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@goszczynskip I’ve switched to https://github.com/tresko/react-datepicker/tree/master/packages/hooks, sorry 😃
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.