I have come across this and found many solutions but none fits my issue.
<input type="date" #evtDate required name="evtDate" placeholder="Select Event Date" id="evtDate" formControlName="eventDate">
It's displayed on the browser as:
I want to show a string placeholder here, something like:
I achieved this using CSS like,
input[type="date"]::before {
content: attr(placeholder);
width: 100%;
}
input[type="date"]:focus::before,
input[type="date"]:valid::before { display: none }
This part has an issue here when I click on its date icon, the date input is again changed to normal format, like:
If I don't use this CSS part, it still shows the custom placeholder value but doesn't update anything on the input.
// input[type="date"]:focus::before,
// input[type="date"]:valid::before { display: none }
I also checked that there's some dynamic HTML created for this input type="data", and that needs to be kept for data to set in that format.
Can anyone please suggest how this can be done? Thanks in advance!