title: React Datepicker RangeError: Invalid time value
body: <p>My datepicker is throwing <code>RangeError: Invalid time value</code> while trying to set selected date value which i am getting from API as string value.</p>
  <p>My API date string is <code>12.09.2020</code></p>
  <pre><code>&lt;DatePicker dateFormat=&quot;dd/MM/yyyy&quot; selected={currentFuelPrice.date_of_sale} onChange={date =&gt; setStartDate(date)} /&gt;
  </code></pre>
  <p>After react 2.0 version, datepicker wont support date as string, it said to use date-fns parseiso...</p>
  <pre><code>import { parseISO } from 'date-fns'; 
  
  currentFuelPrice.date_of_sale = parseISO(response.data.date_of_sale, 1);
  </code></pre>
  <p>after adding parseISO, i am still getting  error <code>RangeError: Invalid time value</code></p>