diff options
author | wei <> | 2006-08-01 00:54:51 +0000 |
---|---|---|
committer | wei <> | 2006-08-01 00:54:51 +0000 |
commit | c1658a277ad56426e88b948eab064b0ce07ea528 (patch) | |
tree | 0536dc134ca3c5e094740cf8f56a040c9eca8e81 /framework | |
parent | 62274f7a89ff033a32bcd436923d39d90831f4db (diff) |
Fixed #312
Diffstat (limited to 'framework')
-rw-r--r-- | framework/Web/UI/WebControls/TDatePicker.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php index 529728ec..f0d00119 100644 --- a/framework/Web/UI/WebControls/TDatePicker.php +++ b/framework/Web/UI/WebControls/TDatePicker.php @@ -328,7 +328,7 @@ class TDatePicker extends TTextBox */
protected function renderDatePickerButtons($writer)
{
- if($this->getShowCalendar())
+ if($this->getShowCalendar() && $this->getEnabled(true))
{
switch ($this->getMode())
{
@@ -553,6 +553,8 @@ class TDatePicker extends TTextBox $writer->addAttribute('id', $this->getClientID().'_day');
$writer->addAttribute('name', $this->getUniqueID().'$day');
$writer->addAttribute('class', 'datepicker_day_options');
+ if($this->getReadOnly() || !$this->getEnabled(true))
+ $writer->addAttribute('disabled', 'disabled');
$writer->renderBeginTag('select');
$this->renderDropDownListOptions($writer, $days, $selected);
$writer->renderEndTag();
@@ -570,6 +572,8 @@ class TDatePicker extends TTextBox $writer->addAttribute('id', $this->getClientID().'_month');
$writer->addAttribute('name', $this->getUniqueID().'$month');
$writer->addAttribute('class', 'datepicker_month_options');
+ if($this->getReadOnly() || !$this->getEnabled(true))
+ $writer->addAttribute('disabled', 'disabled');
$writer->renderBeginTag('select');
$this->renderDropDownListOptions($writer,
$this->getLocalizedMonthNames($info), $selected-1);
@@ -614,6 +618,8 @@ class TDatePicker extends TTextBox $years[$i] = $i;
$writer->addAttribute('id', $this->getClientID().'_year');
$writer->addAttribute('name', $this->getUniqueID().'$year');
+ if($this->getReadOnly() || !$this->getEnabled(true))
+ $writer->addAttribute('disabled', 'disabled');
$writer->renderBeginTag('select');
$writer->addAttribute('class', 'datepicker_year_options');
$this->renderDropDownListOptions($writer, $years, $selected);
|