class Toolkit_Schedule_Calendar
{
+ public $months = array();
/**
* buildCalendar
*
);
$day->class = 'depart'.$row['departure_id'];
$dates[$row['id']] = $day;
+ $month = $date->getMonth();
+ if (!in_array($month, $this->months)) {
+ $this->months[] = $month;
+ }
}
} catch(PDOException $e){
Toolkit_Common::handleError($e);
}
}
$selected = $cals->getDepartureDates($scheduleId);
+// echo '<pre>'.print_r($selected, true).'</pre>';
+// exit;
$year
= ($year)
? $year
$startingMonth = $this->config->months->start;
$endingMonth = $this->config->months->end;
for ($i = $startingMonth; $i <= $endingMonth; ++$i) {
- $page->calendarsHtml .= $cals->buildCalendar($i, $year, $selected);
+ if (in_array($i, $cals->months)) {
+ $page->calendarsHtml .= $cals->buildCalendar($i, $year, $selected);
+ }
}
$tpl = new HTML_Template_Flexy($this->flexyOptions);
$page->style = $style;
flexy.options.compileDir = BASE "Toolkit/Schedule/templates/compiled/"
; the starting month to use in the multiple date picker
-months.start = 4
+months.start = 1
; the ending month to use in the multiple date picker
months.end = 12
; controls the width of the dialog box for the multiple date picker