I am having a problem with the following; I have a dynamically generated table form. In one of the columns I have a select input with some options and in the following column I have an input field for Timestamp that should be automatically filled out with the current date as soon as the user selects one of the options. I have the following code, however, the timestamp is either only generated for the very first row (in case when I use id for input field) or for all of the rows (in case when I use class for input field). I would need the timestamp to be filled only in the same row as the select drop down list is. Any help would be greatly appreciated.
<select class='Status'>
<option value= '1'> Option1 </option>
<option value= '2'> Option2 </option>
</select>
<input type=text class='TimeStamp'/>
Then for my JQuery I have the following code:
$(document).ready(function() {
$('.Status').on('change', function() {
$('.TimeStamp').val("CurrentDate");
});
});