fix more then 59 seconds set for "hms"

This commit is contained in:
Ralf Becker 2021-03-29 18:02:55 +02:00
parent 2841b43109
commit e132cb0603
2 changed files with 2 additions and 3 deletions

View File

@ -741,7 +741,7 @@ var et2_date_duration = /** @class */ (function (_super) {
this.options.value = _value;
if (!this.options.select_unit && this.options.display_format.length > 1) {
for (var i = this.options.display_format.length; --i >= 0;) {
jQuery(this.duration[i]).val(this._unit_from_value(_value, this.options.display_format[i], i === this.options.display_format.length - 1));
jQuery(this.duration[i]).val(this._unit_from_value(_value, this.options.display_format[i], !i));
}
return;
}

View File

@ -916,8 +916,7 @@ export class et2_date_duration extends et2_date
{
for (let i = this.options.display_format.length; --i >= 0;)
{
jQuery(this.duration[i]).val(this._unit_from_value(_value, this.options.display_format[i],
i === this.options.display_format.length-1));
jQuery(this.duration[i]).val(this._unit_from_value(_value, this.options.display_format[i], !i));
}
return;
}