You will have to use https://www.npmjs.com/package/js-datepicker.
<div class="form-field form-datepicker form-datepicker-js">
<label for="datepicker-js" class="form-label">Choose date</label>
<input type="text" class="form-input" id="datepicker-js" />
</div>
Inject necessary styles and scripts
<link rel="stylesheet" href="https://unpkg.com/js-datepicker/dist/datepicker.min.css">
<script src="https://unpkg.com/js-datepicker"></script>
Add following code in DOMContentLoaded
document.addEventListener('DOMContentLoaded', function() {
datepicker('#datepicker-js');
});
For datepicker option check https://www.npmjs.com/package/js-datepicker
It uses native <input type="date">
element
<input type="date">
styles. Please use JavaScript version for better compatibility.
<div class="form-field form-datepicker">
<input type="date" name="datepicker" class="form-input" />
</div>
<div class="form-field form-datepicker">
<input type="month" class="form-input" />
</div>
<div class="form-field form-datepicker">
<input type="week" class="form-input" />
</div>