Fixes from broken calendar next month on days like July 31st #476

Closed
wants to merge 4 commits into from

3 participants

@andrewvc

This is the same as #475 but target into the dev branch per bradrobertson's recommendation.

Fixed addMonth to handle moving between months with different numbers of days more correctly.

Previously, if the month being moved to had more days than the month being moved from, it would attempt to set an impossible date, E.G. July 31 -> August 31 (august has only 30 days). Now, it will move from July 31 -> Aug 30.

Jesse Allen and others added some commits May 31, 2011
Jesse Allen Handling one or zero items with circular
Having one item with circular set to true resulted in a single item
cloned and scrolling, which is not a desirable condition. Having
zero items with circular set to true resulted in an error. By
enforcing a check more similar to the one performed when circular
is false, we are able to catch this condition.

Additionally, the prev and next buttons are set to disabled in the
case of one or zero items.
9abf5af
@bradrobertson bradrobertson Merge pull request #412 from jessecarl/master
Scrollable with one or zero items (and particularly with circular true)
e151df9
@bradrobertson bradrobertson Revert "Merge pull request #412 from jessecarl/master"
This reverts commit e151df9, reversing
changes made to 0046c59.
4b066f9
@andrewvc andrewvc Fixed addMonth to handle moving between months with different numbers…
… of days more correctly.


Previously, if the month being moved to had more days than the month being moved from, it would attempt to set an impossible date, E.G. July 31 -> August 31 (august has only 30 days). Now, it will move from July 31 -> Aug 30.
b43b853
@bradrobertson

Just added this which takes care of this as well. It didn't actually touch the addMonth function though. I'm wondering if your solution is maybe nicer. I suppose we always expect addMonth to behave properly.

BTW if you could make this pull request to dev it can be merged. Our next release will come from there.

How to add these changes in the dateinput plugin?

about to do a release, hopefully within the next week. Keep checking the website for the new version.

can you please let me know what changes required in minified version for the same. (http://cdn.jquerytools.org/1.2.5/form/jquery.tools.min.js)

@bradrobertson

Sorry to be a pain but I think you must have merged in master to dev, which is not what we want to do. There's some divergent code there. Can you just checkout dev and make your change, then issue the pull request with the single commit?

Note the commits above (from others)

@andrewvc
@andrewvc
@bradrobertson

ok cool will do, thx again!

@bradrobertson
@andrewvc
@bradrobertson

thanks for that! we're doing our best. Definitely want to see this project continue to grow and prosper. Your help has been greatly appreciated!

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