Fixes 4429

Fix for JS regression on the frontend for entering card expiration as detailed in #4429.