Developer forum

Forum » CMS - Standard features » ItemRelationList incorrect date format

ItemRelationList incorrect date format

Maik Van Sark
Reply

Hi,

I wanted to save a list of dates so I made an ItemRelationList for Dates. (See my image for the complete story)
Now when I select a date the format is; Vri, 08 Jan 2021. This is because the chosen admin login language is Nederlands.
Although when I save and close this item (DateSelectorItem), I return to the ItemRelationList overview and notice the date format changed.
After saving the Item which contains the ItemRelationList and reopening Item, I notice that the correct format is saved and shown.
Also I have added the Area date/culture settings in the image. We run on DW 9.9.5.

Are there any settings I missed? Or is this a visual bug?

 

Dateformat-bug.png

Replies

 
Nicolai Pedersen
Reply

I think this is just a visual bug on how that row is inserted when first created. 

 
Maik Van Sark
Reply

Ok thanks for confirming. Is this gonna be fixed? Or is there a fix I can perform?

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

Have you tried to use DateTime instead of string in your code first item?

 
Maik Van Sark
Reply

This still shows the initial bug. And now after reloading, the item shows a full date with the wrong format.

The date in de database is now '2021-01-07 00:00:00.000'. While the ItemRelationList still shows (even after reloading).

 
Maik Van Sark
Reply

Ah I found that this is based on the server/localhost settings. I changed my Regional format settings in Windows and its working as expected now (both string and DateTime).

Thanks for your time! (still it shouldn't be based on server/locahost settings right?)

 

You must be logged in to post in the forum