Skip to content

Conversation

@wasinger
Copy link

@wasinger wasinger commented Jun 5, 2013

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.

@AlexandreArpin
Copy link

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.

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

Successfully merging this pull request may close these issues.

2 participants