My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 438: Problem with gotoDate
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Jun 2010


Sign in to add a comment
 
Reported by spiro.st...@gmail.com, Apr 6, 2010
Hi there, 
I am having problems with the gotoDate method when the goto date is the
current date that is loaded by default on the calendar. It is just not
showing anything although all events are being pulled in through the ajax
request. 

Here is an example : 

ie. viewcalendar.php?startp=2004-4-6 
var start_p = $.getURLParam('startp') || 0 ; 
if (start_p ){ 
      var reg_date = /^(\d{4})-(\d{1,2})-(\d{1,2})$/; 
      var start_param = $my.start_p.match(reg_date);
       if (start_param.length == 4){
		var startDate  = new Date(); 
		startDate.setFullYear(start_param[1]);
		startDate.setMonth(start_param[2] - 1); 
		startDate.setDate(start_param[3]); 
		$my.calendar.fullCalendar( 'gotoDate', startDate);
	} 
} 


If you run it with :
    viewcalendar.php?startp=2004-5-6     <-- one month later

It works fine, in fact it works as long the date in the url is not within
the start end ranges specified on calendar init. 

Regards, 

Spiro 
Jun 14, 2010
Project Member #1 adamrs...@gmail.com
this is probably messed up b/c the array coming out of the regex match (start_param) is an array of *strings* so you cant do math on them (like subtract 1)
Status: Done
Sign in to add a comment

Powered by Google Project Hosting