I put the following script to put only month and year in the input, and set the regex to accept typing from 1 to 12 for months:
$.mask.definitions['X'] = "^([0-1]|1[0-2])$";
jQuery(function($){
$("#masked1").mask("X/9999");
$("#masked2").mask("X/2015");
});
But when I put X, it only allows you to enter a number, so if I want to put month 12, I can not. Does anyone have a solution?