<?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); } }}?>