My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2424: calling next doesn't work on first click
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Feb 2015


Sign in to add a comment
 
Reported by war...@gmail.com, Jan 15, 2015
Strange bug appeared with latest pull from GIT:

my function in a custom view:

    computeNextDate: function(date) {
        return date.clone().startOf("week").add(1, "weeks");
    }

no longer works on the first click of the 'next' button (call to .fullCalendar('next')). however, clicking again (calling 'next' a second time, then moves 2 weeks.

yet if I add a console.log output, the date from computeNextDate is the same on both calls.  So why does it jump 2 weeks? is there some delay/issue occurring on the first call?

No errors are showing in firebug :(
Jan 15, 2015
#1 war...@gmail.com
Forgot to add: this function works just fine:

    computePrevDate: function(date) {
        var navJump = this.opt('twoWeekNavJump');
        if ( navJump ) {
            return date.clone().startOf('week').subtract(navJump, 'weeks');
        } else {
            return this.skipHiddenDays(
                date.clone().startOf(this.intervalUnit).subtract(this.intervalDuration), -1
            );
        }
	},

for the previous button.
Feb 9, 2015
Project Member #2 adamrs...@gmail.com
Hi warath, it is really hard for me to tell what is going on without playing with an actual demo. Could you somehow try to get your code up on JSFiddle or JSBin for me to play with?

More info here: http://fullcalendar.io/wiki/Reporting-Bugs/
Feb 9, 2015
Project Member #3 adamrs...@gmail.com
Actually, this is probably a bug I realized and fixed in the most recent release. Related to hiddenDays and weekends=false. See my code here:

https://github.com/arshaw/fullcalendar/blob/v2.2.6/src/common/View.js#L158
Status: Done
Sign in to add a comment

Powered by Google Project Hosting