Skip to content

Commit

Permalink
fix(snapshot-form): Expiration time form field error when not touched
Browse files Browse the repository at this point in the history
  • Loading branch information
aaryanporwal authored and edlerd committed Jun 7, 2023
1 parent 36f4014 commit aa4efc9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/pages/instances/actions/snapshots/SnapshotForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ const SnapshotForm: FC<Props> = ({
onChange={formik.handleChange}
onBlur={formik.handleBlur}
value={formik.values.expirationDate ?? ""}
error={formik.errors.expirationDate}
error={
formik.touched.expirationDate
? formik.errors.expirationDate
: null
}
/>
</Col>
<Col size={6}>
Expand All @@ -115,7 +119,11 @@ const SnapshotForm: FC<Props> = ({
onChange={formik.handleChange}
onBlur={formik.handleBlur}
value={formik.values.expirationTime ?? ""}
error={formik.errors.expirationTime}
error={
formik.touched.expirationTime
? formik.errors.expirationTime
: null
}
/>
</Col>
</Row>
Expand Down

0 comments on commit aa4efc9

Please sign in to comment.