I have a website that loads a JavaScript file from a commercial service, so I am unable to customize this file. The output of this JavaScript file is a form with various input fields, all of which have the class name "wf-input". I now want to add a jQuery date picker to a specific field, but I do not have a class to select only that field.
The field I want to add a datepicker to is as follows:
<input type="text" name="x4" class="wf-input">
My question is: how can I add a class name to only this field?
The only difference between fields is (name="x4").
The code for initializing the datepicker looks like this:
$(function() {
$( ".x4picker" ).datepicker();
});
How can I make this work using JavaScript?