jscheffl commented on code in PR #50072:
URL: https://github.com/apache/airflow/pull/50072#discussion_r2070205100


##########
airflow-core/src/airflow/ui/src/components/DagActions/RunBackfillForm.tsx:
##########
@@ -158,36 +160,27 @@ const RunBackfillForm = ({ dag, onClose }: 
RunBackfillFormProps) => {
               control={control}
               name="from_date"
               render={({ field }) => (
-                <Field.Root invalid={Boolean(errors.date)}>
+                <Field.Root invalid={Boolean(errors.date) || 
dataIntervalInvalid} required>
                   <Field.Label>From</Field.Label>
-                  <DateTimeInput
-                    {...field}
-                    max={dataIntervalEnd || today}
-                    onBlur={resetDateError}
-                    size="sm"
-                  />
+                  <DateTimeInput {...field} max={today} 
onBlur={resetDateError} size="sm" />
+                  <Field.ErrorText>Start Date must be before the End 
Date</Field.ErrorText>
                 </Field.Root>
               )}
             />
             <Controller
               control={control}
               name="to_date"
               render={({ field }) => (
-                <Field.Root invalid={Boolean(errors.date)}>
+                <Field.Root invalid={Boolean(errors.date) || 
dataIntervalInvalid} required>
                   <Field.Label>To</Field.Label>
-                  <DateTimeInput
-                    {...field}
-                    max={today}
-                    min={dataIntervalStart || undefined}
-                    onBlur={resetDateError}
-                    size="sm"
-                  />
+                  <DateTimeInput {...field} max={today} 
onBlur={resetDateError} size="sm" />
+                  <Field.ErrorText>Start Date must be before the End 
Date</Field.ErrorText>

Review Comment:
   Does it make sense to display the same error on both fields? Would it not be 
nicer to display it only once?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to