diff --git a/src/formio/validators/minMaxDateValidator.js b/src/formio/validators/minMaxDateValidator.js index 5d50364a9..65ae2ad2c 100644 --- a/src/formio/validators/minMaxDateValidator.js +++ b/src/formio/validators/minMaxDateValidator.js @@ -11,13 +11,13 @@ const validateDateBoundaries = (minBoundary, maxBoundary, value) => { const parsedValue = new Date(value); if (minDate && maxDate) { - const isValid = parsedValue >= minDate && parsedValue < maxDate; + const isValid = parsedValue >= minDate && parsedValue <= maxDate; let errorKeys = isValid ? [] : parsedValue < minDate ? ['minDate'] : ['maxDate']; return {isValid, errorKeys}; } if (minDate) return {isValid: parsedValue >= minDate, errorKeys: ['minDate']}; - if (maxDate) return {isValid: parsedValue < maxDate, errorKeys: ['maxDate']}; + if (maxDate) return {isValid: parsedValue <= maxDate, errorKeys: ['maxDate']}; }; const MinMaxDateValidator = {