jquery.mtz.monthpicker
jquery.mtz.monthpicker copied to clipboard
Bug: looks for SelectedMonth like "Dec" in data-month that stored "12"
I have set up the pattern: 'mmm yyyy', I then also sen in my own month names for i18n.
I give it a selectedMonth: 12 in the options.
But when I trace the code it is 12 until this line of code runs in init: $this.monthpicker('parseInputValue', settings);
After that line of code selectedMonth is 'Dec' instead of 12
And thats a problem, because for instance when changing year in the dropdown this will run
if ($(this).val() == settings.selectedYear)
{
months.filter('td[data-month=' + settings.selectedMonth + ']').addClass('ui-state-active');
}
And since the html looks like so
<td class="ui-state-default mtz-monthpicker mtz-monthpicker-month" style="padding:5px;cursor:default;" data-month="12">Dec</td>
it will not find the data-month since it's now looking for 'Dec' not 12.