My form element looks like
<div class="modal fade" id="modal-xl">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">You Can Edit This Item</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form role="form" id="modal-form">
<div class="card-body">
<div class="form-group">
<label for="receivingdate">Receiving Date</label>
<input type="date" class="form-control" id="receivingdate" placeholder="Select Receiving Date" required>
</div>
from javascript I just want to set receivingdate
to x/x/x
var form = document.getElementById('modal-form').getElementsByClassName('form-group');
Not sure why this does not work.