Open wottpal opened 5 years ago
A fairly simple work around would be something like this. It isn't perfect but gets the job done
<input
#dateInput matInput
aria-label="Date Input"
(focus)="dateInput.type = 'date'
(blur)="dateInput.type = 'text""
></input>
@jonathanRinciari it is not working on iOS - we can't enter values at all https://stackblitz.com/edit/angular-5ydksc
What is the expected behavior?
Date-Input behaves like all other form-fields when the value is empty and the label is used as its placeholder. When clicked inside the field the format-placeholder should be shown.
What is the current behavior?
Even without any value (or clicking inside it) the form-field label is floating above the input-field and it shows the local format-placeholder 'dd.mm.yyyy'.
What are the steps to reproduce?
https://stackblitz.com/edit/angular-material-form-date-behavior
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
not sure