Closed everdrone closed 5 years ago
I have the same issue. I see that in the package there is utils/formatter/formatCardNumber
but I cannot import it. Can this function be made public?
The onChange
prop is simply forwarded as shown below. The formatted value is set directly to the element. Perhaps a new prop onFormattedValue(value)
would be useful
expiryDate is formatted correctly, the only problem is with cardNumber
I've fixed it by copying the formatCardNumber
code into my project, and then using it when passing down the value.
value={formatCardNumber(cardNumber || "")}
Also another bug is that this function requires sting, null or undefined will raise an exception.
Should be fixed in 1.0.7
. Let me know how it goes!
Both issues are indeed resolved, thanks :)
Just as described in the redme, placed the event handler inside the getter props but formatting is not applied.
what am i doing wrong?