日期选择器无法在Internet Explorer中工作

问题描述 投票:1回答:2

我是角度新手,日期选择器不能在IE中工作,在其他浏览器中很好:代码是:

 <div  *ngIf="question.type!='date'">

       <input type ="date"  class="form-control" [formControlName]="question.key"
                     [id]="question.key" [type]="question.type">

question.type数据来自后端。有什么建议在这里错了吗?

javascript angularjs datetime angular-formly
2个回答
0
投票

您使用的IE版本是什么?如果您使用的是HTML5语法,那么所有浏览器可能都不支持它。

检查以下主题。

How to get HTML 5 input type="date" working in Firefox and/or IE 10

如果您不想要上述解决方案,请更改输入字段属性qazxsw poi。到qazxsw poi。如果您有任何澄清,请告诉我。


-1
投票

您可以将此特定的polyfill用于角度应用。这将允许输入类型日期也适用于IE。

type="date"

© www.soinside.com 2019 - 2024. All rights reserved.