Datepicker
Datepicker examples and all options object properties:
MDBootstrap's datepicker
Standard inputs
<div class="card mb-2">
<h6 class="card-header">Standard inputs</h6>
<div class="card-body">
<form action="#">
<div class="row my-2">
<div class="col">
<div class="form-outline datepicker" data-mdb-format="yyyy, mmm, dd">
<input type="text" class="form-control" id="exampleDatepicker11" />
<label for="exampleDatepicker11" class="form-label"
>Select a date</label
>
</div>
</div>
<div class="col"></div>
</div>
<div class="row">
<div class="col">
<div
class="form-outline datepicker datepicker-with-limits"
data-mdb-input-init
data-mdb-format="dd, mmm, yyyy"
>
<input type="text" class="form-control" id="exampleDatepicker5" />
<label for="exampleDatepicker5" class="form-label"
>Select a date</label
>
</div>
</div>
<div class="col"></div>
</div>
</form>
</div>
</div>
Script required to initialize the datepicker with options object
const datepickerWithLimits = document.querySelector(
'.datepicker-with-limits'
);
new mdb.Datepicker(datepickerWithLimits, {
min: new Date(2023, 11, 5),
max: new Date(2023, 12, 25),
});