diff --git a/packages/js/src/cli/__tests__/snippets.ts b/packages/js/src/cli/__tests__/snippets.ts index 946b37f..9954930 100644 --- a/packages/js/src/cli/__tests__/snippets.ts +++ b/packages/js/src/cli/__tests__/snippets.ts @@ -30,6 +30,10 @@ spec: required: true errorMessage: null placeholder: null + date: + type: justDate + required: true + errorMessage: null eventDate: type: futureDate required: true @@ -98,6 +102,17 @@ export const formExpectedCode = `export const RegistrationForm = { min: 0.1 } }, + date: { + type: "justDate", + required: true, + errorMessage: null, + placeholder: null, + helperMessage: null, + typeSpec: { + type: "date", + allowOnly: null + } + }, eventDate: { type: "futureDate", required: true, @@ -326,4 +341,11 @@ spec: types: - login - password +... +--- +type: type +metadata: + name: justDate +spec: + type: date ` diff --git a/packages/js/src/schema/defs/type.json b/packages/js/src/schema/defs/type.json index f365667..d8f27ed 100644 --- a/packages/js/src/schema/defs/type.json +++ b/packages/js/src/schema/defs/type.json @@ -104,7 +104,7 @@ }, "allowOnly": { "type": ["string", "null"], - "enum": ["past", "future"], + "enum": ["past", "future", null], "default": null } },