title: How to use date range picker along with ajax
body: <p>I am using date range picker javascript library To select range of date from user</p>
  
  <pre><code>                  $('#date_range').daterangepicker({
                      arrows:true,
                      dateFormat: 'd-M-yy',
                      rangeSplitter: 'to',
                      datepickerOptions: {
                           changeMonth: true,
                           changeYear: true,
                           minDate: new Date("01/01/2011") //Account created date
                      },
                      closeOnSelect: true,
                      onChange: function(){
                                      //ajax call goes here
  
                                      }
                    });
  </code></pre>
  
  <p>In my ajax call i am updating the screen with date range. but this on change function runs two times and ajax returns old date value. If need to use ajax functionality with on change function of date range picker.</p>
  
  <p>If any one find solution for using onchange function at once with correct from and to date, intimate me please. Thanks in Advance</p>