It appears that the question can be resolved using a mixin method called setValue("")
.
Further investigation revealed a setValue
method that utilizes a mixin selector $$(<form-id>)
. This results in
$$(<form-id>).setValue("");
https://example.com/code123
When it comes to clearing, the Controller Clear Method employs different logic for datepicker clear instead of utilizing the setValue("") method.
ctrl.clear = function(evt){
ids = document.querySelectorAll("div.evt"+evt);
angular.forEach(ids, function(elem, key){
id = elem.getAttribute("id");
view_id = document.querySelector("#" + id.replace("{{event}}", id) + " > div.webix_view").getAttribute("view_id");
viewid = view_id.replace('$', '');
var el = document.querySelector("#" + id.replace("{{event}}", id));
if (el && el.getAttribute('type') == 'datepicker')
{
elem = document.querySelector("#" + id.replace("{{event}}", id) + " > div.webix_view > div.webix_el_box > div.webix_inp_static");
elem.setAttribute("id", viewid);
elem.innerHTML = '';
elem.innerText = '';
elem.textContent = '';
}
else
{
document.querySelector("#" + id.replace("{{event}}", id) + " > div.webix_view > *").setAttribute("id", viewid);
$$(viewid).setValue('');
}
});
}