jquery.mtz.monthpicker
jquery.mtz.monthpicker copied to clipboard
Set initial month and year from value attribute
If the month/year input already has a value attribute when the form is loaded and the value is parseable to a valid month and year using settings.pattern, then settings.selectedYear and settings.selectedMonth are set from this value.
You should specify your base in the second parameter of parseInt
instead of replacing the leading 0, the reason you had weird behavior is because JS thought your value was in octal and not decimal.
Correct way to do it would be
month = parseInt(month, 10);
Otherwise it seems not very flexible or useful I think.