-
Type:
Bug
-
Status: Done
-
Priority:
Backlog
-
Resolution: Done
-
Affects Version/s: 07.02.01.00
-
Fix Version/s: 07.02.02.00
-
Component/s: Custom Fields
-
Labels:None
Date custom field stores inconsistent date formats.
Changing the date value via the grid pushes the following value into the underlying Contents field thus:
customFieldValue.Contents = Date.Parse(grdCustomFields.ActiveSheet.Cells(e.Row, e.Column).Value).ToString("s")
Note the use of .ToString("s") - this formats the date to ISO8601 standard ("yyyy''MM''dd'T'HH':'mm':'ss").
However, no such formatting is enforced at the business logic layer. Plugin code can (and often does) set the Contents property without such formatting. Notably the "SetValue" helper method does NOT format the date using .ToString("s").
Proposed solution:
Put code in the SetValue helper function, and the Contents SET-er to look at the custom field type, and format the value to ISO8601 for dates.