I've a problem trying to clear with javascript a form with an input of type="datetime"
because the following code doesen't work when i add input:datetime
$form.find('input:text, input:password, input:file, select, textarea').val('');
Can you help me?
Thank you very much!
You can use input[type=datetime] selector instead.
$form.find('input[type=datetime]').val('');
jsFiddle
You would have to use this selector instead:
$('input[type="datetime"]').val('');
Since jQuery as of v1.10 does not recognize input:datetime as a valid selector.
See this fiddle
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