Skip to content

Conversation

meta-meta
Copy link

…of the selected date; resolves #140

@clauderic
Copy link
Owner

Hmm, would you care to elaborate a little about this solution?

@meta-meta
Copy link
Author

new Date(2017, 1, 28)
Tue Feb 28 2017 00:00:00 GMT-0600 (Central Standard Time)
new Date(2017, 1, 31)
Fri Mar 03 2017 00:00:00 GMT-0600 (Central Standard Time)

If the day passed to getMonthsForYear is greater than the number of days in that month, you end up getting the following month. Result being in your year view, you end up with Jan Mar Mar May May...

So the proposed solution is to constrain the day to fall within the month. Math.min returns the lesser of n values.

@fra-smw
Copy link

fra-smw commented Nov 21, 2017

Hi, is there any plan to merge this PR?

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.

docs duplicate some months, miss others

3 participants