mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 01:29:05 +01:00
Et2Date: Fix validation message display
Required validation was incorrectly displayed / not hidden
This commit is contained in:
parent
a1215610c3
commit
1a969c4cfc
@ -677,6 +677,8 @@ export class Et2Date extends Et2InputWidget(FormControlMixin(LitFlatpickr))
|
||||
|
||||
if(value === "" && this._instance.selectedDates.length > 0)
|
||||
{
|
||||
// Update the et2-textbox so it will fail a required validation check
|
||||
this._inputNode.value = '';
|
||||
return this._instance.clear();
|
||||
}
|
||||
let parsedDate = null
|
||||
@ -698,6 +700,9 @@ export class Et2Date extends Et2InputWidget(FormControlMixin(LitFlatpickr))
|
||||
{
|
||||
this._instance.setDate(value, true, this._instance.config.altFormat)
|
||||
}
|
||||
// Update the et2-textbox so it has current value for any (required) validation
|
||||
this._inputNode.value = formattedDate;
|
||||
(<Et2Textbox>this._inputNode).validate();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user