SingleDatePicker auto closes on hover on today when withPortal={true}
See original GitHub issuereact-dates version react-dates@18.4.1
Describe the bug SingleDatePicker auto closes on hover on today when withPortal={true} onDateChange doesn’t get called
Source code (including props configuration) Steps to reproduce the behavior:
import React from 'react';
import { SingleDatePicker } from 'react-dates'
import 'react-dates/lib/css/_datepicker.css';
class Test extends React.Component {
constructor() {
super();
this.state = {
date: null,
focused: false
};
}
render() {
console.log(this.state)
return (
<SingleDatePicker
id="date_input"
withPortal
autoFocus
numberOfMonths={1}
date={this.state.date}
onDateChange={date => {
console.log('date changes')
return this.setState({ date })
}}
focused={this.state.focused}
onFocusChange={({ focused }) => {
console.log('onFocusChange changes')
return this.setState({ focused })
}} />
)
}
}
export default Test;
Is the issue reproducible in Storybook? yes http://airbnb.io/react-dates/?selectedKind=SDP%20-%20Calendar%20Props&selectedStory=horizontal%20with%20portal&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel
Additional context https://stackblitz.com/edit/react-5z8pun?file=Hello.js
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (5 by maintainers)
Top Results From Across the Web
SingleDatePicker auto closes on hover on today ... - GitHub
Steps to reproduce the behavior: import React from 'react'; import { SingleDatePicker } from 'react-dates' import 'react-dates/lib/css/_ ...
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

With in modal SingleDatePicker auto closes on hover on today when withPortal={true}
Whoops, thanks for catching that!
Fixed in #1533.