xxxxxxxxxx
1
<div class="form-outline" data-mdb-datepicker-init data-mdb-input-init>
2
<input type="text" class="form-control" id="exampleDatepicker11" />
3
<label for="exampleDatepicker11" class="form-label">Select a date</label>
4
</div>
5
6
<button class="btn btn-primary clear">Clear</button>
7
8
<script
9
src="https://code.jquery.com/jquery-3.7.1.min.js"
10
integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo="
11
crossorigin="anonymous">
12
</script>
1
1
xxxxxxxxxx
1
$('.clear').click(function() {
2
$('.datepicker-clear-btn').attr('disabled', false).click();
3
//alert("am I working");
4
});
5
Console errors: 0