3
Vote

DateTime field fails silently if no time is specified

description

If a DateTime field is set to store date and time then when trying to save an item having only the date part specified makes storage of the field silently fail. The item is seemingly saved and no warning is displayed but the value of the date is not saved. More precisely: DateTime.MinValue is stored.
I'd prefer to warn the user or even better save the date part and use a default for time (e.g. 0:00).
If the time is specified but not the date I'd definitely go with a warning.

comments