diff --git a/atst/forms/task_order.py b/atst/forms/task_order.py index 99c1e35d..fca7bcfd 100644 --- a/atst/forms/task_order.py +++ b/atst/forms/task_order.py @@ -51,6 +51,16 @@ class CLINForm(FlaskForm): ) loas = FieldList(StringField()) + def validate(self, *args, **kwargs): + valid = super().validate(*args, **kwargs) + if self.start_date.data > self.end_date.data: + self.start_date.errors.append( + translate("forms.task_order.start_date_error") + ) + return False + else: + return valid + class TaskOrderForm(BaseForm): number = StringField(label=translate("forms.task_order.number_description")) diff --git a/templates/components/date_picker.html b/templates/components/date_picker.html index 6924eddc..c41db3d0 100644 --- a/templates/components/date_picker.html +++ b/templates/components/date_picker.html @@ -80,10 +80,10 @@ -
diff --git a/templates/task_orders/step_3.html b/templates/task_orders/step_3.html index f1c3d115..ddead4f6 100644 --- a/templates/task_orders/step_3.html +++ b/templates/task_orders/step_3.html @@ -138,14 +138,15 @@