输入占位符会覆盖日期

时间:2018-05-04 11:48:50

标签: css html5 input

在Chrome中,当用户未完全提供日期时,占位符会覆盖日期:

enter image description here

手工删除月份:

enter image description here

如果没有年份,没有月份和没有输入日期,是否存在占位符必须在日期位置的代码的任何解决方案。

源代码:

<input
    id="tf-datefrom-text"
    class="form-control"
    type="date"
    placeholder="Select date"
    ng-blur="checkValidation()"
    min="{{vm.minDate}}"
    max="{{vm.maxDate}}"
    ng-model="vm.dateFrom"
    aria-describedby="basic-addon2"
    required
    ng-required="true"/>

输入字段没有CSS。

1 个答案:

答案 0 :(得分:1)

如果您使用Material Design,升级到最新版本可能会解决您的问题,因为这是早期版本中的一个错误。请参阅此thread中的更多内容。

相关问题