/** * Builds Day objects in tabular form, to allow display of calendar month * with empty cells if the first day of the week does not fall on the first * day of the month. * @see Calendar_Day::isEmpty() * @see Calendar_Day_Base::isFirst() * @see Calendar_Day_Base::isLast() * @param array (optional) Calendar_Day objects representing selected dates * @return boolean * @access public */ function build($sDates = array()) { require_once CALENDAR_ROOT . 'Table/Helper.php'; $this->tableHelper =& new Calendar_Table_Helper($this, $this->firstDay); Calendar_Month::build($sDates); $this->buildEmptyDaysBefore(); $this->shiftDays(); $this->buildEmptyDaysAfter(); $this->setWeekMarkers(); return true; }
<?php $selection = array($Month); $Year->build($selection); while ($Child =& $Year->fetch()) { if ($Child->isSelected()) { echo "<option value=\"" . $Child->thisMonth() . "\" selected>" . $Child->thisMonth() . "\n"; } else { echo "<option value=\"" . $Child->thisMonth() . "\">" . $Child->thisMonth() . "\n"; } } ?> </select> Day:<select name="d"> <?php $selection = array($Day); $Month->build($selection); while ($Child =& $Month->fetch()) { if ($Child->isSelected()) { echo "<option value=\"" . $Child->thisDay() . "\" selected>" . $Child->thisDay() . "\n"; } else { echo "<option value=\"" . $Child->thisDay() . "\">" . $Child->thisDay() . "\n"; } } ?> </select> Hour:<select name="h"> <?php $selection = array($Hour); $Day->build($selection); while ($Child =& $Day->fetch()) { if ($Child->isSelected()) {