I have the following jsFiddle and want to clear the autocomplete field when the user has selected an item. The following code does not do this:-
Is this possible?
$(
"#input"
).data(
"kendoAutoComplete"
).value(
""
);
Is this possible?
//create AutoComplete UI component
$(
"#input"
).kendoAutoComplete({
dataSource: data,
filter:
"startswith"
,
placeholder:
"Select country..."
,
select:
function
(e) {
var
dataItem =
this
.dataItem(e.item.index());
$(
'#list'
).append(
"<li>"
+ dataItem +
"</li>"
);
$(
"#input"
).data(
"kendoAutoComplete"
).value(
""
);
}
});