Reputation: 99
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!
Upvotes: 3
Views: 5049
Reputation: 63956
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.
Upvotes: 3
Reputation: 5656
You can use input[type=datetime]
selector instead.
$form.find('input[type=datetime]').val('');
Upvotes: 4