Remove default text/placeholder present in html5 input element of type=date

前端 未结 10 2244
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-27 19:32

I am using html input element with type as date,


When I use above element it creates a default date format i.e.

10条回答
  •  渐次进展
    2020-11-27 20:02

    I had similar problem with datetime-local, this worked for me, maybe someone can use it. Text input is much easier than datetime to style

    type='text' required='' onfocus="this.type='datetime-local'" onblur="if(this.value==='')this.type='text'"
    

提交回复
热议问题