From 837b7af71deb8c16d9cf7301b989ffd6016c106d Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 17 Jul 2007 13:21:57 +0000 Subject: code moving. --- framework/Web/UI/WebControls/TDatePicker.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php index eee5ac2f..3e9d97df 100644 --- a/framework/Web/UI/WebControls/TDatePicker.php +++ b/framework/Web/UI/WebControls/TDatePicker.php @@ -351,6 +351,14 @@ class TDatePicker extends TTextBox public function onPreRender($param) { parent::onPreRender($param); + if($this->getInputMode() === TDatePickerInputMode::DropDownList) + { + $page = $this->getPage(); + $uniqueID = $this->getUniqueID(); + $page->registerPostDataLoader($uniqueID.TControl::ID_SEPARATOR.'day'); + $page->registerPostDataLoader($uniqueID.TControl::ID_SEPARATOR.'month'); + $page->registerPostDataLoader($uniqueID.TControl::ID_SEPARATOR.'year'); + } $this->publishCalendarStyle(); } @@ -767,14 +775,6 @@ class TDatePicker extends TTextBox */ protected function publishCalendarStyle() { - if($this->getInputMode() === TDatePickerInputMode::DropDownList) - { - $page = $this->getPage(); - $uniqueID = $this->getUniqueID(); - $page->registerPostDataLoader($uniqueID.TControl::ID_SEPARATOR.'day'); - $page->registerPostDataLoader($uniqueID.TControl::ID_SEPARATOR.'month'); - $page->registerPostDataLoader($uniqueID.TControl::ID_SEPARATOR.'year'); - } $url = $this->getAssetUrl($this->getCalendarStyle().'.css'); $cs = $this->getPage()->getClientScript(); if(!$cs->isStyleSheetFileRegistered($url)) -- cgit v1.2.3