score:0

Accepted answer
const formatDate = (date) => isNil(date.seconds)
   ? date // Already a javascript date object
   : date.toDate()

<DatePicker
    margin="normal"
    label="Data do pedido"
    fullWidth
    value={
     formatDate(form.datapedido)
    }
    onChange={handleChangeData}
      variant="filled"
      style={{ marginTop: 0 }}
  />

Related Query

More Query from same tag