diff options
author | wei <> | 2006-08-29 13:41:36 +0000 |
---|---|---|
committer | wei <> | 2006-08-29 13:41:36 +0000 |
commit | da895b1c97234c9640d94bef0e2027b9fc8a6a66 (patch) | |
tree | 3a39971114d30adb88b95019e2ff83588c506e5a /framework/Web/UI/WebControls | |
parent | 13b256cdf8e3cef810d1b3dcf580be751b94c9fe (diff) |
Fixing ticket #274
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r-- | framework/Web/UI/WebControls/TDataTypeValidator.php | 2 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TDatePicker.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/framework/Web/UI/WebControls/TDataTypeValidator.php b/framework/Web/UI/WebControls/TDataTypeValidator.php index 3e91ec15..ec39e8a3 100644 --- a/framework/Web/UI/WebControls/TDataTypeValidator.php +++ b/framework/Web/UI/WebControls/TDataTypeValidator.php @@ -91,7 +91,7 @@ class TDataTypeValidator extends TBaseValidator {
if($value=='')
return true;
-
+
switch($this->getDataType())
{
case 'Integer':
diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php index 0c3e0b9a..b6daa164 100644 --- a/framework/Web/UI/WebControls/TDatePicker.php +++ b/framework/Web/UI/WebControls/TDatePicker.php @@ -317,14 +317,14 @@ class TDatePicker extends TTextBox /**
* Returns the value to be validated.
* This methid is required by IValidatable interface.
- * @return integer the value of the property to be validated.
+ * @return integer the interger timestamp if valid, otherwise the original text.
*/
public function getValidationPropertyValue()
{
- if($this->getText() === '')
+ if(($text = $this->getText()) === '')
return '';
$date = $this->getTimeStamp();
- return $date == null ? '' : $date;
+ return $date == null ? $text : $date;
}
/**
|