Which Umbraco version are you using?
17.2.1
Bug summary
I have a property configured as a DateOnly editor, and retrieving the value on an IContent node using GetValue<DateOnly?>() or GetValue<DateOnly>() returns null or minimum date respectively instead of the actual value:
For example, the following image shows the raw value when called using the non-Generic form of GetValue and what happens when called with the Generic form:
This also produces similar output if I attempt to retrieve the value as a DateTime as well.
Specifics
See above
Steps to reproduce
- Create a document type with a DateOnly property editor on it
- Create a node based on the document type and set the property to a valid value.
- Attempt to retrieve the value using the ContentService and IContent representation of the node
- Value will be null if calling
content.GetValue<DateOnly?>()
Expected result / actual result
The actual value should be returned
Which Umbraco version are you using?
17.2.1
Bug summary
I have a property configured as a DateOnly editor, and retrieving the value on an IContent node using
GetValue<DateOnly?>()orGetValue<DateOnly>()returns null or minimum date respectively instead of the actual value:For example, the following image shows the raw value when called using the non-Generic form of GetValue and what happens when called with the Generic form:
This also produces similar output if I attempt to retrieve the value as a
DateTimeas well.Specifics
See above
Steps to reproduce
content.GetValue<DateOnly?>()Expected result / actual result
The actual value should be returned