Fix a minor bug

When the year of the option 'to' is same to that of the default chosen year but the month of the option 'to' is not December, it happens that I can't choose the month disabled even when I select the previous year.

The problem can be solved by moving the checking process of whether a month can be chosen to the handler 'select'