title: How do I pass the date range selected in the daterangepicker to a variable or back to my input textbox in javascript?
body: <p>My javascript below using preset ranges for DateRangePicker -
  I need to pass the selected start and end dates to two variables call StartDate and EndDate or pass it back to my LogiXML input text box.  I am not sure how to do this.  Please help.  </p>
  
  <p>Note: I don't want to run the daterangepicker logic for two different input fields(from and to). I want to use one input field but the start and end dates are passed to two separate variables.</p>
  
  <p>I am using comiseo.daterangepicker  please help me.</p>
  
  <pre><code>$(document).ready(function() {
                      $("#inpDatePicker").daterangepicker({
                          presetRanges: [{
                              text: 'Today',
                              dateStart: function() { return moment() },
                              dateEnd: function() { return moment() }
                          }, {
                              text: 'Month to Date',
                              dateStart: function() { return moment().startOf('month')  },
                              dateEnd: function() { return moment() }
                          }, {
                              text: 'Quarter to Date',
                              dateStart: function() { return moment().startOf('quarter') },
                              dateEnd: function() { return moment() }
                          }, {
                              text: 'Year to Date',
                              dateStart: function() { return moment().startOf('Year') },
                              dateEnd: function() { return moment() }
                          }],
                          applyOnMenuSelect: true,
                          datepickerOptions: {
                              minDate: 0,
                              maxDate: null,
                              numberOfMonths : 3,
                              changeMonth: true,
                              changeYear: true
  
                          }
                      })
                  });
  </code></pre>