This patch fixes two issues with the ExpirationInputView keydown bind function:
Entering a month or year of 0 will cause the card to stick on the front face with no indication that the expiration is invalid. This happens because the internal date property as set to null
If a month greater than 12 is entered, the original code would pass this to the javascript Date constructor, which would automatically increment the current date by (month value / 12) years. This would never cause a validation error because there is no bounds on the year check
This patch sets the date to January 1st, 1900 in order to trigger the expired date validation and display a problem on the card display.
This patch fixes two issues with the ExpirationInputView keydown bind function:
This patch sets the date to January 1st, 1900 in order to trigger the expired date validation and display a problem on the card display.
Previous result with 0 as month![screen shot 2014-06-26 at 2 44 25 pm](https://cloud.githubusercontent.com/assets/308887/3405371/86709d34-fd7c-11e3-8b72-66575d2fdd5b.png)
Previous result with 99 as month![screen shot 2014-06-26 at 2 44 36 pm](https://cloud.githubusercontent.com/assets/308887/3405378/a29a859c-fd7c-11e3-95fb-9cfb09bf1d36.png)
New result with 99 as month![screen shot 2014-06-26 at 2 56 20 pm](https://cloud.githubusercontent.com/assets/308887/3405391/ccc2b8b2-fd7c-11e3-9ec8-8f90af7ba8a8.png)