Open oysteinthoensisjord opened 1 week ago
Nice! I've by deleting and adding the datamodel in our app once more. Now it seems to behave as expected.
A note: deleting the datamodel in Altinn Studio isn't trivial. The popup for confirming the deletion is hidden by the top menu. BUT! Opening developer tools and making the window quite small reveals the popup.
Description of the bug
For schemas having elements of type xs:date and nillable = true, the XML which is stored in an instance loses the xsi:nil=true attribute at some point.
Related to xs:date, it is represented in C# as a string having a regex. Couldn't it be represented as DateOnly instead?
Steps To Reproduce
Define element in XSD:
<xs:element name="tillatelsedato" type="xs:date" nillable="true" minOccurs="0" maxOccurs="1"/>
Create instance with nil input for the datefield XML input
<tillatelsedato xsi:nil="true" />
Retreive the dataelement, the ouput will be like this
<tillatelsedato/>
Additional Information