mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-18 03:48:55 +01:00
Et2Date: Fix timeonly does not update value the first time when manually typing a new value
This commit is contained in:
parent
846852ca22
commit
0f145323b2
@ -744,8 +744,17 @@ export class Et2Date extends Et2InputWidget(FormControlMixin(LitFlatpickr))
|
||||
// Avoid infinite loop of setting the same value back triggering another change
|
||||
this._instance.input.value !== flatpickr.formatDate(parsedDate, this.getOptions().dateFormat))
|
||||
{
|
||||
try
|
||||
{
|
||||
// Can error for time-only due to missing calendar
|
||||
this._instance.setDate(value, true, this._instance.config.altFormat)
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
// Just do it again, it works the second time
|
||||
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