You'll also save yourself some aggravation if you break the input into its constituent parts right away. It can be formatted to look like all one box, but handle each one separately. Then any non-digit input can be construed as "move to next field".
So you have:
Field 1 (month, and make sure you say this plainly so as not to confuse non-American visitors who won't expect a month in this position):
first input \d (because some users
will ignore "leading 0" instructions)
if first was 0: ignore any further 0 and wait for [1-9]
if first was 1: [0-2] ignoring [3-9]
if first was [3-9]: supply leading 0 and proceed directly to second field
AND
if first was[1-9] and second is \D then proceed as above with added leading 0
Field 2:
same, only this time the breakdown is 0 vs. [1-2] vs. [3-9]
Will you allow them to type 02/30 and yell at them later, or do you want to block it right away? Same of course for SAJN, but 02 is the most clear-cut.
I'm only trying to block the user from typing characters that violate the pattern.
It may be easier to let them type anything they like and just ignore the non-permitted ones.
Incidentally, have you got many three-year-old members? At this point there are not even many situations where a year beginning in 20xx would be valid.