We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Since errors from DatePicker validations are just shown after bluring:
I would like to have the way for showing the validation errors during onTextInput event. For now I'm work-arounding this by
const [value, setValue] = useState(initialValue); const [invalidDateError, setInvalidateError] = useState<string>(); // Not to duplicate error messages and display error during onChange const [showInvalidDateError, setShowInvalidDateError] = useState(true); const dateValidators = ... return ( <> <DatePicker onChange={(_, dateStr) => { setValue(dateStr); setShowInvalidDateError(true); // To show errors during typing }} onBlur={(_, dateStr) => { setValue(dateStr); setShowInvalidDateError(false); // To not duplicate errors coming either from invalidDateError and the ones from the component }} value={value} validators={dateValidators} /> {invalidDateError && showInvalidDateError ? ( <HelperText> <HelperTextItem variant="error">{invalidDateError}</HelperTextItem> </HelperText> ) : undefined} </> );
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Since errors from DatePicker validations are just shown after bluring:
I would like to have the way for showing the validation errors during onTextInput event. For now I'm work-arounding this by
The text was updated successfully, but these errors were encountered: