#8728: Upgrade/datetimefield format #8729
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #8728
Added the AllowDisplayOptionsOverride property in DateTimeFieldSetting.
Handled this setting in DateTimeField so that it returns the overriding value (if set) or (if there's no overriding value set) the setting value.
Handles a new case in in DefaultDateLocalizationServices.cs: when converting a DateTime to and from UTC with the IgnoreDate setting, if the DateTime had a valid Date (!= DateTime.min) the code was returning a wrong value since it didn't handle the solar time correctly.
Probably this case wasn't handled correctly since DateTimeFields were only allowing the user to insert the time when their Display property was set to TimeOnly, but we decided to show both the Date and Time editors when the AllowDisplayOptionsOverride is set to true so now it's possibile to have to convert DateTime with a valid date and the IgnoreDate option set to true.