summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/Web/UI/WebControls/TDatePicker.php16
1 files 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))