Is there any way to set the format of ? if no then how can i set date in this field using JavaScript in the default format of
What you want to do is fetch the value from the input and assign it to a new Date instance.
let date = document.getElementById('dateInput'); let formattedDate = new Date(date.value); console.log(formattedDate);