When using 'toISOString ()' in JavaScript, it appears as shown in photo 2. How can I modify this format?
Note: I am working with AngularJs. Image 1 is located in list.component.ts
Additional documents:
Image 1:
formatDate(e) {
var convertDate = new
Date(e.target.value).toISOString().substring(0, 10);
this.studentForm.get('dob').setValue(convertDate, {
onlyself: true
})
}