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
I'm working with react-payment-inputs and material ui:
const { meta, getCardNumberProps, getExpiryDateProps, getCVCProps, getCardImageProps } = usePaymentInputs(); const { erroredInputs, touchedInputs } = meta; ... const [expiryDate, setExpiryDate] = useState(); const handleChangeExpiryDate = (event) => setExpiryDate(event.target.value); ... <TextField inputProps={{ "data-testid": "expireDate" }} {...getExpiryDateProps({ onChange: handleChangeExpiryDate })} defaultValue = { expiryDate } error={ (erroredInputs.expiryDate && touchedInputs.expiryDate) ? true : false } helperText= { (touchedInputs.expiryDate) && erroredInputs.expiryDate } label="Expiry Date" type="text" margin="dense" fullWidth />
In this example validation work fine but don't format the input date as 00/00
If I implement a simple input everything it's ok
<input {...getExpiryDateProps({ onChange: handleChangeExpiryDate })} value={expiryDate} />
Saludos, muchas gracias.
The text was updated successfully, but these errors were encountered:
Hi, You need to pass the getter method to inputProps like this:
<TextField inputProps={getExpiryDateProps({ onChange: handleChangeExpiryDate })} defaultValue = { expiryDate } error={ (erroredInputs.expiryDate && touchedInputs.expiryDate) } helperText= { (touchedInputs.expiryDate) && erroredInputs.expiryDate } label="Expiry Date" type="text" margin="dense" fullWidth />
Sorry, something went wrong.
No branches or pull requests
I'm working with react-payment-inputs and material ui:
In this example validation work fine but don't format the input date as 00/00
If I implement a simple input everything it's ok
Saludos, muchas gracias.
The text was updated successfully, but these errors were encountered: