I have a field for entering the date of birth, and I want the result of the insert to be formatted in 'DD-MM-YYYY'. I was able to make the date appear in the input in the desired formatting, however when I send the date to the database it goes like this: "1997-08-19T00: 00: 00.000-03: 00".
I created a function to format the date, but it did not work:
formatarData () {
let data = this.pessoa.nascimento
this.pessoa.nascimento = date.formatDate(data, 'DD-MM-YYYY')
}
Now you are going to the bank like this: "NaN-NaN-0NaN", how to format so that it goes out as desired ??