<?phpclass Calendar01 extends Page { public function InitializeComponent() { parent::$PAGE_TITLE = "Tutorial : Simple Calendar"; $this->render = new Calendar($this); }}?>
<?phpclass Calendar02 extends Page { public function InitializeComponent() { parent::$PAGE_TITLE = "Tutorial : Calendar with advance properties"; $this->render = new Calendar($this); // set current date $now = new DateTime(); $this->render->setValue($now); // display buttons "today" and "done" $this->render->showButtonPanel(); // display combobox to change month $this->render->changeMonth(); // display combobox to change year $this->render->changeYear(); // display days of months before and after $this->render->showOtherMonths(); // display week number $this->render->showWeek(); // define min date $now->modify("-3 days"); $this->render->setMinDate($now); // define opening animation $this->render->setShowAnim(Calendar::ANIMATION_BOUNCE); }}?>
<?phpclass Calendar03 extends Page { private $edt_date = null; public function InitializeComponent() { parent::$PAGE_TITLE = "Tutorial : Calendar with form, callback method on change in AJAX"; $form = new Form($this); $this->edt_date = new Calendar($form); $this->edt_date->onChange("onChangeCalendar"); $this->edt_date->setAjaxEvent(); $form->setContent($this->edt_date); $this->render = $form; } public function onChangeCalendar($sender) { if (get_class($this->edt_date->getValue()) == "DateTime") { $dialog = new DialogBox("onChangeCalendar", $this->edt_date->getValue()->format("m-d-Y")); $this->addObject($dialog); } }}?>
<?phpclass Calendar04 extends Page { public function InitializeComponent() { parent::$PAGE_TITLE = "Tutorial : Calendar with LiveValidation"; $form = new Form($this); $edt_date = new Calendar($form); $lv = new LiveValidation(); $lv->addValidateCalendar($edt_date->getDateFormat()); $edt_date->setLiveValidation($lv); $form->setContent($edt_date); $this->render = $form; }}?>