title: How to Put date into input type date in react js
body: <p>i have a problem with how to put date that i get from json data into date input, like i said i want to put it into input type date but the problem is when i console.log the date, its came out but its not cameout into field and still dd/mm/yyyy</p>
  
  <p>mydate</p>
  
  <pre><code>{
    this.state.post2.map((h, i) =&gt; {
      if (
        `${h.username}` ===
        `${this.state.formData.username}`
      ) {
        return (
          &lt;FormGroup&gt;
            &lt;FormGroup&gt;
              &lt;Label htmlFor="middleName"&gt;
                Middle Name
              &lt;/Label&gt;
              &lt;Input
                onChange={this.handleForm}
                key={i}
                defaultValue={h.middleName}
                type="text"
                name="middleName"
                className="form-control"
                placeholder="Middle Name"
                required=""
              /&gt;
            &lt;/FormGroup&gt;
            &lt;FormGroup&gt;
              &lt;Label htmlFor="lastName"&gt;Last Name&lt;/Label&gt;
              &lt;Input
                onChange={this.handleForm}
                key={i}
                defaultValue={h.lastName}
                type="text"
                name="lastName"
                className="form-control"
                placeholder="Last Name"
                required=""
              /&gt;
            &lt;/FormGroup&gt;
            &lt;FormGroup&gt;
              &lt;Label htmlFor="email"&gt;Email&lt;/Label&gt;
              &lt;Input
                onChange={this.handleForm}
                key={i}
                defaultValue={h.email}
                type="text"
                name="email"
                className="form-control"
                placeholder="Email"
                required=""
              /&gt;
            &lt;/FormGroup&gt;
            &lt;FormGroup&gt;
              &lt;Label htmlFor="phone"&gt;Phone Number&lt;/Label&gt;
              &lt;Input
                onChange={this.handleForm}
                value={h.phone}
                type="text"
                name="phone"
                className="form-control"
                placeholder="Phone Number"
                required=""
              /&gt;
            &lt;/FormGroup&gt;
            &lt;FormGroup&gt;
              &lt;Label for="expiredDate"&gt;
                Expired Date
              &lt;/Label&gt;
              &lt;Input
                type="date"
                name="expiredDate"
                onChange={this.handleForm}
                defaultValue={new Date(h.expiredDate)}
                placeholder="date placeholder"
                min={moment().format('YYYY-MM-DD')}
              /&gt;
            &lt;/FormGroup&gt;
          &lt;/FormGroup&gt;
        );
      }
    });
  }
  </code></pre>
  
  <p>response in console.log</p>
  
  <pre><code>25-01-2021 07:00:00
  
  </code></pre>
  
  <p>i already try to console.log and it appear but not appear on field and still dd/mm/yyyy
  how to change dd/mm/yyyy into date that i get ? </p>