IE 11 compatibility issue: Adaptive Card containing Date Picker is not rendered
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
@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.
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:
- 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.
- 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
- 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 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 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.
@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 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...
If IE11 support is still an active issue for people, please re-open!
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