Fixes a parsing bug with the expiry field when typing in a RTL context. Since we are currently using a u200e control character to override the directionality of the card number and expiry date fields, it causes our month variable in payform.parseCardExpiry to return NaN.
Changes
Fixes a parsing bug with the expiry field when typing in a RTL context. Since we are currently using a
u200e
control character to override the directionality of the card number and expiry date fields, it causes our month variable inpayform.parseCardExpiry
to returnNaN
.Why introduce these changes?
payform.parseCardExpiry()
function in a RTL context.How is this achieved?
replace()
function and a regex for\u200e
to remove all its occurences from the string before it gets parsed.