SingleDatePicker Doesnt accept onDayMouseEnter param
See original GitHub issueThe SingleDatePicker component doesnt accept onDayMouseEnter param to pass along to the DayPicker component it creates.
onDayMouseEnter(day, modifiers, e) {
this.setState({
hoverDate: day,
});
this.props.onDayMouseEnter(day, modifiers, e);
}
instead of the current:
onDayMouseEnter(day) {
this.setState({
hoverDate: day,
});
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:9 (2 by maintainers)
Top Results From Across the Web
SingleDatePicker Doesnt accept onDayMouseEnter param #94
The SingleDatePicker component doesnt accept onDayMouseEnter param to pass along to the DayPicker component it creates.
Read more >React - onmouseenter doesn't work between child elements
This sounds like an event bubbling issue. ... Try accessing the event object by including it as a parameter to the function.
Read more >Element: mouseenter event - Web APIs | MDN
The mouseenter event is fired at an Element when a pointing device (usually a mouse) is initially moved so that its hotspot is...
Read more >onmouseenter Event - W3Schools
The onmouseenter event occurs when the mouse pointer enters an element. The onmouseenter event is often used together with the onmouseleave event, ...
Read more >RangeError: Maximum call stack size exceeded (getting this ...
Coding example for the question RangeError: Maximum call stack size exceeded (getting this error on multiple async/await calls)-Reactjs.
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 FreeTop 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
Top GitHub Comments
I need to be able to style specific dates differently. I also need to display a tooltip when hovering over those specific dates to display a user a message specific to those dates.
I was able to accomplish this by allowing modifiers to be passed into the SingleDatePicker as well as onDayMouseEnter and onDayMouseLeave callbacks.
I am mostly just curious why the SingleDayPicker and DateRangePicker don’t just allow all props of DayPicker to be passed through since both create an instance of DayPicker internally. Is there a reason you chose not to do that?
There are 15 open PRs; that’s nowhere close to being a big queue.
A PR would certainly help continue the discussion.
As for why the DayPicker props aren’t all allowed, perhaps @majapw can weigh in.