Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: looks for SelectedMonth like "Dec" in data-month that stored "12" #65

Open
rickardliljeberg opened this issue Dec 6, 2014 · 0 comments

Comments

@rickardliljeberg
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant