Fixed incorrect date when selecting previous month #65

Merged
merged 1 commit into from Feb 27, 2014

Conversation

Projects
None yet
2 participants
@danielksb
Contributor

danielksb commented Feb 26, 2014

This commit is fixing a bug which occured during date selection. When selecting a day of the previous month which is higher than the current date's day the wrong date will be selected. This happens because setting a day with setDate() which is higher than the current month will automatically change the day to a lower number. That's why the month has to be set before the day.

How to reproduce: Let's say February, 26th is selected and then the user wants to switch to January, 30th then January, 2nd will be selected instead.

Fixed date selection bug
This commit is fixing a bug which occured during date selection. When selecting a day of the previous month which is higher than the current date's day the wrong date will be selected. This happens because setting a day with setDate() which is higher than the current month will automatically change the day to a lower number. That's why the month has to be set before the day.

How to reproduce: Let's say February, 26th is selected and then the user wants to switch to January, 30th then January, 2nd will be selected instead.

xdan added a commit that referenced this pull request Feb 27, 2014

Merge pull request #65 from danielksb/master
Fixed incorrect date when selecting previous month

@xdan xdan merged commit ff8a3d0 into xdan:master Feb 27, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment