From 9aa4c6f4039d7e6cda69d4dd1d3e64072a00d18e Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 3 May 2023 08:41:20 -0600 Subject: [PATCH] Et2DateDuration: Fix value of "" caused NaN --- api/js/etemplate/Et2Date/Et2DateDuration.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/etemplate/Et2Date/Et2DateDuration.ts b/api/js/etemplate/Et2Date/Et2DateDuration.ts index 24aa40937c..16d2f6adcb 100644 --- a/api/js/etemplate/Et2Date/Et2DateDuration.ts +++ b/api/js/etemplate/Et2Date/Et2DateDuration.ts @@ -347,7 +347,7 @@ export class Et2DateDuration extends Et2InputWidget(FormControlMixin(LitElement) set value(_value) { - this._display = this._convert_to_display(parseFloat(_value)); + this._display = this._convert_to_display(_value == "" ? 0 : parseFloat(_value)); this.requestUpdate(); }