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 = ` -
+