Tomasz Waszczyk
Tomasz Waszczyk

Reputation: 3129

Input placeholder overrides date

In Chrome, when date is not fully given by user, placeholder overrides date:

enter image description here

delete by hand month:

enter image description here

Is there any solution to code that placeholder has to go on date place iff when there is no year, no month and no day in input.

Source code:

<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"/>

And there is no CSS for the input field.

Upvotes: 1

Views: 88

Answers (1)

If you use Material Design, upgrading to the latest version might solve your issue, because this has been a bug in earlier versions. See more in this thread.

Upvotes: 1

Related Questions