title: ReactJS - How to change the date format from an input field?
body: <p>In react app, I am using an array like,</p>
  <pre><code>const result = [
    {firstname: &quot;Shruthi&quot;, lastname: &quot;R&quot;, phone: &quot;1234567890&quot;, birthday: &quot;24/05/1991&quot;},
    {firstname: &quot;Maanya&quot;, lastname: &quot;C&quot;, phone: &quot;8882334324&quot;, birthday: &quot;19/07/1990&quot;},
    {firstname: &quot;Chethan&quot;, lastname: &quot;Kumar&quot;, phone: &quot;7888382222&quot;, birthday: &quot;24/05/1995&quot;}
  ];
  </code></pre>
  <p>Date input field is,</p>
  <pre><code>&lt;input type=&quot;date&quot; onChange={props.handleOnChange} /&gt;
  
  handleOnChange = (e) =&gt; {
    const date = e.target.value; // getting different format here
    console.log(date);
  }
  </code></pre>
  <p>Based on the above, date input field and the birthday field in array list (<code>result</code>) contains <code>dd/mm/yyyy</code> format but in <code>handleOnChange</code> function I am getting it in <code>yyyy-mm-dd</code> format.</p>
  <p>How can I change the date format to <code>dd/mm/yyyy</code> ?</p>