Documentation
Vanila Datepicker
Use the required class varient (e.g. vanila-datepicker, vanila-daterangepicker, datepicker-inline active ) for different datepicker. For more details
HTML Code
<div class="input-group">
<input type="text" class="form-control vanila-datepicker" placeholder="Date Picker">
</div>
Script
const datepickers = document.querySelectorAll('.vanila-datepicker')
Array.from(datepickers, (elem) => {
new Datepicker(elem)
})
const daterangePickers = document.querySelectorAll('.vanila-daterangepicker')
Array.from(daterangePickers, (elem) => {
new DateRangePicker(elem)
})