From b4cc3f40b3ed49f1974e3a6c99a149856a7d92c5 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Mon, 6 Feb 2023 13:54:09 +0100 Subject: [PATCH] corrected several minor flaws --- ccp/js/inputwidgeteditorcontroller.js | 29 +++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/ccp/js/inputwidgeteditorcontroller.js b/ccp/js/inputwidgeteditorcontroller.js index e354656..227b91c 100644 --- a/ccp/js/inputwidgeteditorcontroller.js +++ b/ccp/js/inputwidgeteditorcontroller.js @@ -31,7 +31,7 @@ class CCPInputWidgetEditorController extends HTMLElement{ }else if(this.#input.schema.format === "time"){ return "time" }else if(this.#input.schema.format === "dateTime"){ - return "dateTime" + return "datetime-local" } return "text" } @@ -39,13 +39,25 @@ class CCPInputWidgetEditorController extends HTMLElement{ isSelectedFormat(fmt){ return this.#input.schema.format === fmt } - - render(input, i){ + + renderDefaultByType(){ + if(this.#input.schema.format === "code"){ + return ` + + ` + } else { + return ` + + ` + } + } + + render(input, i, reopen){ this.#index = i this.#input = input this.#type = input.schema.enum ? "enum" : "string" this.innerHTML = ` -
+