that's how I resolved the question:
var saldataFatturaChange = function(event) {
event.preventDefault();
var currentTarget = event.target;
var prompt = bootbox.prompt("Confermare la data di pagamento", function(result) {
if (result === null) {
} else {
$(currentTarget).find('.data-pagamento').val(result);
currentTarget.submit();
}
});
$('.bootbox-input').daterangepicker({
startDate: new Date(),
format: 'DD/MM/YYYY',
singleDatePicker: true
});
};
$('.form-fattura-saldata').each(function() {
$(this).on('submit', saldataFatturaChange);
});
Simply, the event has a event.target that is the target of the event that is fired. This was really simple to achieve.