Yess You can use this:-
<input id="dt" class="input" onfocus="(this.type='date')" placeholder="hello">
use onfocus="(this.type='date')"
and then you can use placeholder as per you wise
Or
You can use this CSS trick to do this:-
input[type="date"]:before {
content: attr(placeholder) !important;
color: #aaa;
margin-right: 0.5em;
}
input[type="date"]:focus:before,
input[type="date"]:valid:before {
content: "";
}
after attaching this to your input date
, then you can use the placeholder with the dates
For example:-
this is an HTML code with the above-mentioned CSS code:-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
input[type="date"]:before {
content: attr(placeholder) !important;
color: #aaa;
margin-right: 0.5em;
}
input[type="date"]:focus:before,
input[type="date"]:valid:before {
content: "";
}
</style>
</head>
<body>
<input type="date" name="date" id="date" placeholder="Hello">
</body>
</html>