jquery select2 refresh data
Try emptying the select2 options before to update data, this because by default it appends data to existing options.
$('.select2-slot').empty();
$('.select2-slot').select2({
data: data.slots
});
Try emptying the select2 options before to update data, this because by default it appends data to existing options.
$('.select2-slot').empty();
$('.select2-slot').select2({
data: data.slots
});