JSFiddle - React, Tailwind, and code Playground
HTML
<div id="mainapp">
</div>
CSS
input[type="date"] {
width: 100%
}
input[type="date"].empty {
color: transparent;
}
input[type="date"].notempty,
input[type="date"].empty:focus {
color: #495057;
}
input[type="date"].notempty:before,
input[type="date"].empty:focus:before {
content: "";
margin-right: 0;
}
input[type="date"].empty:before {
content: attr(placeholder);
color: #6c757d;
}
JavaScript
var mySimpleApp = new Vue({
el: '#mainapp',
data: {
date: ""
},
template: `<input type="date" v-model="date" placeholder="Type a date" :class="{'empty': !date, 'notempty': date}" />`
})