Keep item from being changed from text values for datetime fields, code simplification