title: jquery select2 refresh data
body: <p>I using <code>select2</code> to select and <code>ajax</code> to load data, how can I replace old data when the state is changed after initial selection.</p>
  
  <p>My loading code:</p>
  
  <pre><code>$('.datetimepicker').on("changeDate", function() {  
          //refresh selectbox ??
          doctor_id = $(".select2-doctors").val();
          clinic_id = $(".select2-clinics").val();
          date = $('.datetimepicker').datepicker('getFormattedDate');
          $.ajax({
              url: '/admin/appointments/time_slots',
              type: 'GET',
              dataType: 'json',
              data: {doctor_id: doctor_id, clinic_id: clinic_id, date: date}
          })
          .done(function(data) {
              console.log("success");
              console.log(data);
              $('.select2-slot').select2({
                  data: data.slots
              });
          })
          .always(function() {
              console.log("complete");
          });
      });
  </code></pre>