I've got the following script:
$(document).ready(function(){
calendar = $('.fullcalendar').fullCalendar({
defaultView: $.cookie('fullcalendar_defaultView') || 'agendaWeek',
viewDisplay: function(view) {
$.cookie('fullcalendar_defaultView', view.name);
if (calendar) {
MySetDate();
}
}
}
function MySetDate() {
var thedate = $('.fullcalendar').fullCalendar('getDate');
raw_date = thedate + 'stringed';
raw_split_date = raw_date.split(' ');
switch (raw_split_date[1])
{
case 'Jan': raw_month = 0; break;
case 'Feb': raw_month = 1; break;
case 'Mrt': raw_month = 2; break;
case 'Apr': raw_month = 3; break;
case 'May': raw_month = 4; break;
case 'Jun': raw_month = 5; break;
case 'Jul': raw_month = 6; break;
case 'Aug': raw_month = 7; break;
case 'Sep': raw_month = 8; break;
case 'Oct': raw_month = 9; break;
case 'Nov': raw_month =10; break;
case 'Dec': raw_month =11; break;
}
$.cookie('lof_y', raw_split_date[3], { expires: 2 } );
$.cookie('lof_m', raw_month, { expires: 2 } );
$.cookie('lof_d', raw_split_date[2], { expires: 2 } );
}
function setMyView() {
$('.fullcalendar').fullCalendar('gotoDate', $.cookie('lof_y'), $.cookie('lof_m'), $.cookie('lof_d') );
$.cookie('lof_y', null);
}
if ($.cookie('lof_y')) {
setMyView();
}
});
And I get the following error on line 18 ( at function MySetDate() ):
Uncaught SyntaxError: Unexpected token )
I see the '(' at line 4 is not closed anywhere, I've tried numerous ways but none of them solved the problem (or resulted in more problems)
Can anyone assist me on this?