AdaptiveCards icon indicating copy to clipboard operation
AdaptiveCards copied to clipboard

IE 11 compatibility issue: Adaptive Card containing Date Picker is not rendered

Open mrPrateek95 opened this issue 9 years ago • 8 comments

Getting an error: "Can't render card" for an adaptive card containing a Date Picker in IE 11

Console dump: Error(s) rendering AdaptiveCard: Error: Invalid argument. Error: Invalid argument. at e.prototype.internalRender (https://webchat.botframework.com/scripts/botchat.js:34:201614) at t.prototype.render (https://webchat.botframework.com/scripts/botchat.js:34:185129) at e.prototype.internalRender (https://webchat.botframework.com/scripts/botchat.js:34:216053) at e.prototype.internalRender (https://webchat.botframework.com/scripts/botchat.js:34:223605) at t.prototype.render (https://webchat.botframework.com/scripts/botchat.js:34:185129) at e.prototype.render (https://webchat.botframework.com/scripts/botchat.js:34:227380) at e.prototype.componentDidMount (https://webchat.botframework.com/scripts/botchat.js:34:60052) at t.prototype.notifyAll (https://webchat.botframework.com/scripts/botchat.js:34:19581) at f.close (https://webchat.botframework.com/scripts/botchat.js:34:289500) at i.closeAll (https://webchat.botframework.com/scripts/botchat.js:20:38927)

Same code seems to be working fine in Chrome

mrPrateek95 avatar Jul 27 '17 07:07 mrPrateek95

@dclaux we've seen a few reports of this, might need to dig into it. Seems the HTML we generate for input.date doesn't work on <IE11.

matthidinger avatar Nov 11 '17 00:11 matthidinger

This is a known issue that I've mentioned repeatedly over the last few months. IE11 doesn't support the HTML5 <input type='date'> which means there is no built-in date picker in IE.

I think there are three main solutions:

  1. A host overrides the DateInput element (e.g. deregister the built-in one, writes their own and register it for the type "Input.Date"). With this option the host can use whichever date picker control/library it wants
  • This really is the only option for a host right now.
  1. The Adaptive renderer takes a dependency on an external library to support date picker on IE11
  • I am not a fan of this option. Many libraries are heavy, and we would likely need to customize one to our own needs
  1. We build our own set of controls for Adaptive
  • This option has my preference, and I have implemented a set of JS controls months ago to that end. But I have never had time to finish.

dclaux avatar Nov 11 '17 03:11 dclaux

@dclaux Any updates of your JS controls to render the date input in IE11? We have the same issue currently and our clients are looking for the solution.

CalvinFengDatacom avatar Jul 06 '18 04:07 CalvinFengDatacom

@CalvinFengDatacom In my project we decided to render this https://reactdatepicker.com/ for date inputs, instead of waiting for a solution. It took a little tweaking in AdaptiveCardContainer.tsx but the wait for the client was definitely shorter that way.

julius-jouninpoika avatar Jul 06 '18 07:07 julius-jouninpoika

@dclaux I don't recommend putting custom control in Adaptive Cards. Otherwise, we will fall into a hole of customizations. Maybe just fix IE11 so it become a normal textbox and allow user to use their own control.

compulim avatar Jul 17 '18 18:07 compulim

@compulim that is the solution I favor as well now, mostly because it doesn't increase the size of the library. That said the out-of-box experience won't be great...

dclaux avatar Jul 17 '18 19:07 dclaux

If IE11 support is still an active issue for people, please re-open!

andrewleader avatar Jun 19 '19 23:06 andrewleader

This is still kind of an issue. The Date and Time inputs in the cards are great but the fact that it's just a plain text input in IE11 is very unhelpful for browser compatibility. At my organization, people still use IE so it needs to be supported. Would be nice to get an example code of a library that successfully converts the text inputs into date/time. I'm actually filling in time and date with Luis so I could just disable the inputs for IE but it's not the best idea especially considering people using IE usually need more user friendliness

wal88 avatar Nov 27 '19 10:11 wal88