title: Identify selected date range in react-date-range
body: <p>I am using react-date-range plugin to select a date range.</p>
  <pre><code>import { DateRangePicker} from 'react-date-range';
  import 'react-date-range/dist/styles.css';
  import 'react-date-range/dist/theme/default.css';
  </code></pre>
  <p><a href="https://i.stack.imgur.com/i3c2D.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i3c2D.png" alt="enter image description here" /></a></p>
  <p>Following function is used to handle the date range when a range is selected</p>
  <pre><code>    function handleSelect() {
              
      }
  </code></pre>
  <p>I have added the DateRangePicker like this</p>
  <pre><code>const selectionRange = {
      startDate: new Date(),
      endDate: new Date(),
      key: 'selection',
  }
  
  &lt;div&gt;
      &lt;DateRangePicker
      ranges={[selectionRange]}
      onChange={handleSelect}/&gt;
  &lt;/div&gt;
  </code></pre>
  <p>I want to make some operations on the selected date range in side the handleChange function. But I cannot find how to identify which date range is selected and the respective start and end dates.</p>
  <p>In documentation onChange callback is described as
  <a href="https://i.stack.imgur.com/1wyw5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1wyw5.png" alt="enter image description here" /></a></p>
  <p>But I cannot understand how to get these startDate and endDate parameters.
  Can someone help me to get this values.</p>
  <p>Documentation: <a href="https://openbase.io/js/react-date-range/documentation" rel="nofollow noreferrer">https://openbase.io/js/react-date-range/documentation</a></p>