diff options
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;
}
/**
|