Et2Date: Fire change event when a new date is selected

Fixes nm date filters not filtering
This commit is contained in:
nathan 2023-01-30 16:10:49 -07:00
parent 328c8224cb
commit 0b15ede568

View File

@ -691,7 +691,8 @@ export class Et2Date extends Et2InputWidget(FormControlMixin(LitFlatpickr))
{ {
// Update the et2-textbox so it will fail a required validation check // Update the et2-textbox so it will fail a required validation check
this._inputNode.value = ''; this._inputNode.value = '';
return this._instance.clear(); this._instance.clear();
this.dispatchEvent(new Event("change", {bubbles: true}));
} }
let parsedDate = null let parsedDate = null
try try
@ -716,6 +717,7 @@ export class Et2Date extends Et2InputWidget(FormControlMixin(LitFlatpickr))
this._inputNode.value = formattedDate; this._inputNode.value = formattedDate;
(<Et2Textbox>this._inputNode).validate(); (<Et2Textbox>this._inputNode).validate();
} }
this.dispatchEvent(new Event("change", {bubbles: true}));
} }
/** /**