Hello,
The problem is definitely on the script side and almost for certain the month_array() method is to blame.
As we can't recreate the issue, I wish to ask you for some help investigating the issue.
Can you please replace the month_array() with the following code and then launch EPESI, go to month view, October and post here the additional output that calendar generate?
public function month_array($date, $mark = array()) {
$first_day_of_month = strtotime(date('Y-m-', $date).'01');
$diff = date('w', $first_day_of_month)-$this->settings['first_day_of_week'];
print('FDoM: '.date('Y-m-d H:i:s j', $first_day_of_month).'<br>');
if ($diff<0) $diff += 7;
$currday = Base_RegionalSettingsCommon::reg2time(date('Y-m-d',strtotime('-'.$diff.' days',$first_day_of_month)).' 00:00:00');
$curmonth = date('m', $date);
print('First day: '.date('Y-m-d H:i:s j', strtotime($currday) ).'<br>');
$month = array();
$today = Base_RegionalSettingsCommon::time2reg(null,false,true,true,false);
$colors = CRM_Calendar_EventCommon::get_available_colors();
while (date('m', $currday) != ($curmonth)%12+1) {
$week = array();
$weekno = date('W',$currday);
$link = $this->create_unique_href(array('action'=>'switch','time'=>$currday, 'tab'=>'Week'));
for ($i=0; $i<7; $i++) {
$main_month = date('m', $currday)==$curmonth;
$next = array(
'day'=>date('j', $currday),
'day_link' => $this->create_unique_href(array('action'=>'switch', 'time'=>$currday, 'tab'=>'Day')),
'style'=>($main_month?(date('Y-m-d',$currday)==$today?'today':'current'):'other').(date('N',$currday)>=6?'_weekend':''),
'time'=>$currday
);
if ($main_month && isset($mark[date('Y-m-d',$currday)])) {
$next['style'].= ' event-'.$colors[$mark[date('Y-m-d',$currday)]];
}
$week[] = $next;
//$currday = strtotime(date('Y-m-d',strtotime(date('Y-m-d 00:00:00',$currday))+3600*24).' '.date('H:i:s',$currday));
$currday = Base_RegionalSettingsCommon::reg2time(date('Y-m-d',strtotime('+1 day',strtotime(Base_RegionalSettingsCommon::time2reg($currday,true,true,true,false)))).' 00:00:00');
print('Following day: '.date('Y-m-d H:i:s j', strtotime($currday) ).'<br>');
}
$month[] = array(
'week_label'=>$weekno,
'week_link' => $link,
'days'=>$week);
}
return $month;
}
With this information I should be able to pinpoint where the issue starts.
Thank you for your patience and I sincerely apologize for the inconvenience.
Kind regards,
Arek