From d223df797d277acc61b47e9303a0c2537c72d9e7 Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 30 Mar 2007 11:15:23 +0000 Subject: Fixed #526 --- framework/Web/UI/WebControls/TDatePicker.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'framework/Web/UI/WebControls') 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(); } -- cgit v1.2.3