fix: invalid custom time value (#4547)

This commit is contained in:
Yunus M 2024-02-14 17:26:33 +05:30 committed by GitHub
parent b3bc78d23c
commit 7ec25b4f62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -154,7 +154,7 @@ function CustomTimePicker({
break; break;
} }
if (minTime && minTime < maxAllowedMinTime) { if (minTime && (!minTime.isValid() || minTime < maxAllowedMinTime)) {
setInputStatus('error'); setInputStatus('error');
onError(true); onError(true);
setInputErrorMessage('Please enter time less than 6 months'); setInputErrorMessage('Please enter time less than 6 months');