input::-webkit-calendar-picker-indicator {
  display: none;
}<input type="date" />This is the code for hiding it. How can I change the icon to some other icons?
The trick is to hide the icon using opacity:0, then you can add your own icon. In this simple I'm using fontawesome calendar icon.
input::-webkit-calendar-picker-indicator {
  opacity:0;
}
input {
  position:relative;  
}
input:before {
  content: "\f073";
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position:absolute;
  right:0;
  top:50%;
  transform:translateY(-50%);
}<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" />
<input type="date" />If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With