ASP.NET TextBox TextMode set to Date not working in IE 11

匿名 (未验证) 提交于 2019-12-03 09:05:37

问题:

<asp:TextBox ID="txtDate" runat="server" TextMode="Date" /> 

It works in Chrome, but not in Firefox or IE 11. Googling around isn't yielding a lot of helpful answers. As far as I know, IE 11 is HTML5 compliant.

回答1:

The TextMode property generally corresponds to the <input type="" /> attribute (excepting multiline which renders a <textarea />). ASP.NET 4.x introduced additional values corresponding to new HTML5 input types.

Internet Explorer 11 does not support most of these new input types, specifically it does not currently support the "date", "datetime", nor "time" values. http://caniuse.com/#feat=input-datetime however Chrome, Opera, and Mobile Safari currently do.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!