admin defaults fixes
authorKurund Jalmi <kurundjalmi@thirdsectordesign.org>
Fri, 3 Nov 2023 18:05:59 +0000 (18:05 +0000)
committerKurund Jalmi <kurundjalmi@thirdsectordesign.org>
Fri, 3 Nov 2023 18:05:59 +0000 (18:05 +0000)
ext/afform/admin/ang/afGuiEditor/elements/afGuiField.component.js

index 512f7e48ace40303b14b00ebb8de72e9a337e3bc..e5ca829c2439cd41b65d314519cb0fee81d04f60 100644 (file)
         }
         setDateOptions();
 
-        if (ctrl.getDefn().input_type == 'Date' && !getSet('default_date_type')) {
-          ctrl.defaultDateType = getSet('default_date_type', 'fixed');
+        if (ctrl.getDefn().input_type == 'Date') {
+          if (!getSet('default_date_type')) {
+            ctrl.defaultDateType = getSet('default_date_type', 'fixed');
+          } else {
+            ctrl.defaultDateType = getSet("default_date_type");
+          }
         }
       };