Added validation for InspectionDate and set a maximum year restriction in InspectionView.
This commit is contained in:
@@ -66,6 +66,8 @@ public partial class InspectionViewModel : ViewModelBase
|
||||
{
|
||||
Inspection.Name = Name;
|
||||
Inspection.CreationDate = CreationDate;
|
||||
if (InspectionDate.Year > 2500)
|
||||
InspectionDate = DateTimeOffset.Now;
|
||||
Inspection.InspectionDate = InspectionDate;
|
||||
Inspection.PeriodType = PeriodType.ToDescription();
|
||||
Inspection.PeriodValue = PeriodValue;
|
||||
|
||||
Reference in New Issue
Block a user