mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-15 04:24:57 +01:00
Et2Date: Fix timeonly does not update value the first time when manually typing a new value
This commit is contained in:
parent
ddde9ab05a
commit
2946316d0b
@ -744,7 +744,16 @@ 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))
|
||||
{
|
||||
this._instance.setDate(value, true, this._instance.config.altFormat)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user