React-dates: SingleDatePicker doesn't fire onDateChange in IE11

Created on 5 Feb 2019  路  20Comments  路  Source: airbnb/react-dates

react-dates version
e.g. [email protected]

Describe the bug
In, IE11, SingleDatePicker renders and opens on focus. But when I click on a date, the calendar disappears without updating the date in the input. This works fine on other browsers.

Desktop (please complete the following information):

  • OS: Windows
  • Browser IE
  • Version 11.0.9600.19236

Is the issue reproducible in Storybook?
https://airbnb.io/react-dates/?selectedKind=SingleDatePicker%20%28SDP%29&selectedStory=default&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel

bug pull request wanted

Most helpful comment

I'll take a look today!

All 20 comments

Any update on this? We're having the same issue and tried importing airbnb-browser-shims without success. Would be much appreciated if this could be fixed.

This should be fixed in v19.0.3. Please let me know if that's not the case!

I'm afraid it still doesn't work :<
Just tested on WM with windows 7 and ie11

It works using 19.0.3 in the DateRangePicker but the SingleDatePicker still does not work.

Confirmed still not working in IE for SDP default example on airbnb.io/react-dates

I am seeing this issue on react-dates 19.0.3 (was also seeing it on 18.4.1).

  • OS: Windows 10 Enterprise x64
  • Browser: Internet Explorer 11
  • Browser Version: 11.2007.14393.0
  • [email protected]

No javascript console errors.

On the same computer, it works on Chrome and Edge.

Hi there!
The method onDateChange is not called on IE11 when user selects the date

Having the same issue my version is ^20.0.0

I'm also seeing this issue in v20.0.0

Actually it looks like the error started occurring when I updated from react-dates 18.1.0 to 18.1.1.

So no update on this?

Actually it looks like the error started occurring when I updated from react-dates 18.1.0 to 18.1.1.

It's working fine for me on v18.3.1 & v18.4.0 and started to be an issue from v18.4.1.

I'll take a look today!

@rvanlaarhoven it might be possible I updated from 18.1.0 to 18.4.1 -- what's interesting is in order to roll back I also had to roll back the package-lock.json file; changing the version in package.json alone didn't make a difference. Maybe I just don't grasp the impact of package-lock.json well enough. Thanks @majapw!

Once this fix lands in master, I鈥檒l backport it to v18 and v19 as well.

Actually it looks like the error started occurring when I updated from react-dates 18.1.0 to 18.1.1.

It's working fine for me on v18.3.1 & v18.4.0 and started to be an issue from v18.4.1.

I've tried this versions and there's no response 馃槩

Hi all,
the bug is the same founded for DateRangePicker in #1516 the solution is the same: in method "onFocusOut" of SingleDatePicker you have to change:
if (this.dayPickerContainer.contains(e.relatedTarget || e.target)) return;
into:
if (this.dayPickerContainer.contains(e.relatedTarget || e.target) || this.dayPickerContainer.contains(e.target)) return;

release the fix please... PR #1578

Hello, any update on this?

@ljharb @majapw the issue is still present. Currently using react-dates ^18.2.2 but upgrading to ^20.0.0 still didn't solve the problem.

@svvb it should be fixed in v20.2. if not, please file a new issue.

Was this page helpful?
0 / 5 - 0 ratings