Skip to content

Commit

Permalink
fix(jv-input-controls): fix min date when is not provided by server
Browse files Browse the repository at this point in the history
this commit is intended to fix the validation for the min date in case is not provided by the server
  • Loading branch information
ecanchev-jaspersoft committed Oct 15, 2024
1 parent c43befb commit 09a8e91
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/jv-input-controls/src/utils/DateInputControlUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,17 @@ export const verifyDateLimit = ({
isVerifyingMin,
}: {
dataType: InputControlDataType | undefined;
maxOrMinDateAsString: string | null;
maxOrMinDateAsString: string | null | undefined;
dateAsString: string;
isVerifyingMin: boolean;
}): { helperText: string; isError: boolean } => {
let helperText = "";
let isError = false;
if (dataType === undefined || maxOrMinDateAsString === null) {
if (
dataType === undefined ||
maxOrMinDateAsString === null ||
maxOrMinDateAsString === undefined
) {
return { helperText, isError };
}
// verify the number is under the limits of the data type
Expand Down

0 comments on commit 09a8e91

Please sign in to comment.