'remove mm/dd/yyyy on placeholder input type date

We have on text filed input type date .So we need placedholder so we tried like this

<input placeholder="Date" class="textbox-n" type="text" onfocus="(this.type='date')"  id="date"> 

Now it's showing placehoder "Date".Then i press it's showing mm/dd/yyyy.Then click it's showing Date box.But no need show mm/dd/yyyy .After click on textField directly open date box .Please guide to us.



Solution 1:[1]

As described in the previous discussions, you can not set the value to blank for JavaScript Date object. For more information refer to :How to initialize java.util.date to empty


However,you can set the default values to a valid date. Refer to How to set date value for more information.

Solution 2:[2]

Apply below css to your input box.

::-webkit-input-placeholder { /* Chrome/Opera/Safari */

  color: white;

}

::-moz-placeholder { /* Firefox 19+ */

  color: white;

}

:-ms-input-placeholder { /* IE 10+ */

  color: white;

}

:-moz-placeholder { /* Firefox 18- */

  color: white;

}
<input placeholder="Date" class="textbox-n" type="text" onfocus="(this.type='date')"  id="date"> 

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Glorfindel
Solution 2 Umesh