From 66164ad2ebf506ca6eaf65e590b9fc3378d07761 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 25 Jul 2022 13:32:06 -0600 Subject: [PATCH] Fix disabled widgets returning a value Fixes calendar event created via quick add, duration is wrong --- api/js/etemplate/Et2Date/Et2Date.ts | 2 +- api/js/etemplate/Et2InputWidget/Et2InputWidget.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2Date/Et2Date.ts b/api/js/etemplate/Et2Date/Et2Date.ts index 145ef3244b..f2e81bb9ab 100644 --- a/api/js/etemplate/Et2Date/Et2Date.ts +++ b/api/js/etemplate/Et2Date/Et2Date.ts @@ -457,7 +457,7 @@ export class Et2Date extends Et2InputWidget(FormControlMixin(ValidateMixin(LitFl getValue() { - if(this.readOnly) + if(this.readOnly || this.disabled) { return null; } diff --git a/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts b/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts index 3feb44e183..1cb00d29e7 100644 --- a/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts +++ b/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts @@ -239,7 +239,7 @@ const Et2InputWidgetMixin = >(superclass : T) getValue() { - return this.readOnly ? null : this.value; + return this.readOnly || this.disabled ? null : this.value; }