summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
authorwei <>2007-03-30 11:15:23 +0000
committerwei <>2007-03-30 11:15:23 +0000
commitd223df797d277acc61b47e9303a0c2537c72d9e7 (patch)
treeb9f8fb6cb3ec6135f3a111356794cf9118bd5217 /framework/Web
parent9db5f1ef950e571d19cc70f1b22da1d77f22448b (diff)
Fixed #526
Diffstat (limited to 'framework/Web')
-rw-r--r--framework/Web/UI/WebControls/TDatePicker.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php
index 9ee24b53..3e85ffb9 100644
--- a/framework/Web/UI/WebControls/TDatePicker.php
+++ b/framework/Web/UI/WebControls/TDatePicker.php
@@ -378,12 +378,16 @@ class TDatePicker extends TTextBox
*/
protected function renderDatePickerButtons($writer)
{
- if($this->getShowCalendar() && $this->getEnabled(true))
+ if($this->getShowCalendar())
{
switch ($this->getMode())
{
- case TDatePickerMode::Button: $this->renderButtonDatePicker($writer); break;
- case TDatePickerMode::ImageButton : $this->renderImageButtonDatePicker($writer); break;
+ case TDatePickerMode::Button:
+ $this->renderButtonDatePicker($writer);
+ break;
+ case TDatePickerMode::ImageButton :
+ $this->renderImageButtonDatePicker($writer);
+ break;
}
}
}
@@ -718,6 +722,8 @@ class TDatePicker extends TTextBox
$writer->addAttribute('type', 'button');
$writer->addAttribute('class', $this->getCssClass().' TDatePickerButton');
$writer->addAttribute('value',$this->getButtonText());
+ if(!$this->getEnabled(true))
+ $writer->addAttribute('disabled', 'disabled');
$writer->renderBeginTag("input");
$writer->renderEndTag();
}
@@ -734,6 +740,8 @@ class TDatePicker extends TTextBox
$writer->addAttribute('src', $url);
$writer->addAttribute('alt', ' ');
$writer->addAttribute('class', $this->getCssClass().' TDatePickerImageButton');
+ if(!$this->getEnabled(true))
+ $writer->addAttribute('disabled', 'disabled');
$writer->renderBeginTag('img');
$writer->renderEndTag();
}