question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SingleDatePicker Doesnt accept onDayMouseEnter param

See original GitHub issue

The 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:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
smoakeycommented, Sep 23, 2016

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?

1reaction
ljharbcommented, Apr 21, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found