How do you programmatically clear HTML5 date fields?

后端 未结 10 1268
我在风中等你
我在风中等你 2020-12-11 16:18

I\'m looking for a way to programmatically clear HTML5 date fields with Javascript (specifically jQuery). So far I have tried two methods which I thought obvious:

         


        
10条回答
  •  既然无缘
    2020-12-11 16:42

    this line works with my browser (chrome, latest version)

    $('input[type=date]')[0].value = 0;
    

提交回复
热议问题