title: Reactjs How to get the value of Start date and End date?
body: <p>How can I get the value of start date and end date? I use:</p>
  <pre class="lang-js prettyprint-override"><code>import { DateRangePickerComponent } from '@syncfusion/ej2-react-calendars';
  </code></pre>
  <p>This is a duplicate question because I want to get the start and end date separately.</p>
  <pre class="lang-js prettyprint-override"><code>import { DateRangePickerComponent } from '@syncfusion/ej2-react-calendars';
  import { makeStyles } from '@material-ui/core/styles';
  
  const [startdate, setStartDate] = useState(&quot;&quot;);
  const [enddate, setEndDate] = useState(&quot;&quot;);
  const onChangedate = (props) =&gt; {
    const stateDate = props.startDate;
    const endDate = props.endDate;
    setStartDate(stateDate)
    setEndDate(endDate)
  };
  
  const handleUpdateButton = async ()=&gt; {
    console.log(startdate, enddate) // I just want to print here the start date and end date
  }
  
  &lt;Grid item xs={12} sm={6} md={6} lg={6} style={{padding: 15, paddingBottom: 0, alignItems: 'center'}}&gt;
    &lt;DateRangePickerComponent id=&quot;daterangepicker&quot; change={onChangedate} placeholder='Select a range' style={{paddingTop: 10, fontSize: 16}}/&gt;
  &lt;/Grid&gt;
  
  &lt;Grid item xs={12} style={{padding: 8}}&gt;
   &lt;Button onClick={handleUpdateButton} variant=&quot;contained&quot;color=&quot;primary&quot; fullWidth&gt;
     Apply Filters
   &lt;/Button&gt;
  &lt;/Grid&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/xEwRW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xEwRW.png" alt="enter image description here" /></a></p>