xxxxxxxxxx
1
<form id="searchForm" method="POST" onsubmit="return false;"
2
class="c-expandable-search-form js-kobee-search-form">
3
<div class="card border border-dark mb-3">
4
<div class="card-header border border-dark mb-3">
5
title
6
</div>
7
<div class="card-body">
8
<div class="container-fluid m-0">
9
<div class="row">
10
<div class="col-6">
11
<div id="advancedSearchCriteria">
12
<div class="row">
13
<div class="col">
14
<div class="form-outline" data-mdb-datetimepicker-init
15
data-mdb-input-init>
16
<input type="text" class="form-control"
17
name="styleGuideSearchView.date"
18
id="datetimepickerInput" />
19
<label for="datetimepickerInput" class="form-label">Datefield:
20
</label>
21
</div>
22
</div>
23
</div>
24
</div>
25
</div>
26
</div>
27
28
</div>
29
</div>
30
</div>
31
</form>
1
1
xxxxxxxxxx
1
/**
2
* Javascript code used to support the Kobee combobox functionality.
3
* For this to work, the input must have the js-kobee-autocomplete CSS class,
4
* as well as a data-kobee-autocomplete attribute with the list of items to complete.
5
*/
6
7
8
var searchForms = document.querySelectorAll(".js-kobee-search-form");
9
searchForms.forEach(initSearch);
10
11
function initSearch(/** DomNode */ searchForm) {
12
searchForm.addEventListener('change', execSearch);
13
}
14
15
function execSearch(/**event */ event) {
16
console.log("onChange executed");
17
}
Console errors: 0