fix handling of date custom fields