diff --git a/web/src/app/util/ISOPickers.tsx b/web/src/app/util/ISOPickers.tsx index 6d6e900036..8055a15332 100644 --- a/web/src/app/util/ISOPickers.tsx +++ b/web/src/app/util/ISOPickers.tsx @@ -66,6 +66,7 @@ function ISOPicker(props: ISOPickerProps): JSX.Element { ) function getSoftValidationError(value: string): string { + if (props.disabled) return '' let dt: DateTime try { dt = DateTime.fromISO(value, { zone }) @@ -95,7 +96,7 @@ function ISOPicker(props: ISOPickerProps): JSX.Element { useEffect( () => setValidationError(props.name || '', getSoftValidationError(inputValue)), - [inputValue, valueAsDT, props.name, softMin, softMax], + [inputValue, props.disabled, valueAsDT, props.name, softMin, softMax], ) useEffect(() => {