Skip to content

DASH DatePickerEditor: sh:datatype should be xsd:date, but in FDP only sh:dateTime is accepted #504

@66Noah2018

Description

@66Noah2018

What components are related to the issue?

Metadata Schemas

Which FDP are you using?

My local instance

Version

Server
Version	v1.16.1~a1adf7b
Built at	16. 1. 2023, 19:56
Client
Version	v1.16.2~0fffee6
Built at	16. 1. 2023, 21:41

What happened?

When using the DASH DatePickerEditor, the sh:datatype should be xsd:date (see https://datashapes.org/forms.html#DatePickerEditor). But if this is specified as such in a metadata schema, you will get a datatype constraint error when adding a new record based on this schema. This is resolved by using sh:dateTime instead, but this is not correct according to DASH. In code:

:ClinicalTrialShape a sh:NodeShape;
    sh:targetClass :ClinicalTrial;
    sh:property [
        sh:path :startDate;
        sh:name "Study Start Date";
        sh:order 10;
        sh:minCount 1;
        sh:maxCount 1;
        sh:datatype xsd:dateTime;
        dash:editor dash:DatePickerEditor;
        dash:viewer dash:LiteralViewer;
    ]

It works but is invalid according to DASH

It should be:

:ClinicalTrialShape a sh:NodeShape;
    sh:targetClass :ClinicalTrial;
    sh:property [
        sh:path :startDate;
        sh:name "Study Start Date";
        sh:order 10;
        sh:minCount 1;
        sh:maxCount 1;
        sh:datatype xsd:date;
        dash:editor dash:DatePickerEditor;
        dash:viewer dash:LiteralViewer;
    ]

valid, but throws the aforementioned error

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions