Your arrow function was incorrectly formatted and you used the same ID more than once.
function getTime () {
const inpCont = document.querySelectorAll('.input_cont [name="time"]');
inpCont.forEach((fields) => {
fields.value="5:00:00 AM";
});
}
getTime();
<div class="input_cont">
<Input type="text" name="time">
</div>
<div class="input_cont">
<Input type="text" name="time">
</div>
<div class="input_cont">
<Input type="text" name="time">
</div>
2
solved I’m trying to put all the same values inside my input fields