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:
Use the native defaultValue property:
defaultValue
$('input[type=date]').each( function resetDate(){ this.value = this.defaultValue; } );
This works as long as the form doesn't have an initial value specified, as demonstrated in this fiddle.
value