From c3926c103618d16084fb7893fe4139211c16cb28 Mon Sep 17 00:00:00 2001 From: Mark Patton Date: Mon, 25 Nov 2024 13:03:14 -0500 Subject: [PATCH] Make publication date required for JScholarship. Treat properly as a date. Use localized date format for date picker display. --- .../src/main/resources/schemas/jhu/global.json | 13 ++++++++++--- .../main/resources/schemas/jhu/jscholarship.json | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pass-core-metadataschema-service/src/main/resources/schemas/jhu/global.json b/pass-core-metadataschema-service/src/main/resources/schemas/jhu/global.json index ee52fbd0..3d2c8018 100644 --- a/pass-core-metadataschema-service/src/main/resources/schemas/jhu/global.json +++ b/pass-core-metadataschema-service/src/main/resources/schemas/jhu/global.json @@ -264,8 +264,16 @@ }, "publicationDate": { "type": "date", - "label": "Publication Date (optional)", + "label": "Publication Date ", "hidden": false, + "helpersPosition": "above", + "validate": true, + "inputType": "date", + "fieldClass": "date-time-picker", + "picker": { + "format": "L", + "allowInputToggle": true + }, "order": 8 }, "abstract": { @@ -308,12 +316,11 @@ "label": "Embargo End Date", "helper": "After the embargo end date, your submission manuscripts or article can be made public. If this publication is not under embargo, please leave this field blank.", "helpersPosition": "above", - "placeholder": "dd/mm/yyyy", "validate": true, "inputType": "date", "fieldClass": "date-time-picker", "picker": { - "format": "MM/DD/YY", + "format": "L", "allowInputToggle": true }, "order": 12, diff --git a/pass-core-metadataschema-service/src/main/resources/schemas/jhu/jscholarship.json b/pass-core-metadataschema-service/src/main/resources/schemas/jhu/jscholarship.json index 64cd158b..887106ad 100644 --- a/pass-core-metadataschema-service/src/main/resources/schemas/jhu/jscholarship.json +++ b/pass-core-metadataschema-service/src/main/resources/schemas/jhu/jscholarship.json @@ -13,7 +13,7 @@ "$ref": "global.json#/properties/authors" } }, - "required": ["authors"] + "required": ["authors", "publicationDate"] }, "options": { "$ref": "global.json#/options"