From 8ab196ce6c2d5de323bdd8ebcc11a73814c0cdca Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 26 Apr 2006 21:18:01 +0000 Subject: Merge from 3.0 branch till 971. --- framework/Web/UI/WebControls/TDataTypeValidator.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'framework/Web/UI/WebControls/TDataTypeValidator.php') diff --git a/framework/Web/UI/WebControls/TDataTypeValidator.php b/framework/Web/UI/WebControls/TDataTypeValidator.php index d78be7bf..ebcaace7 100644 --- a/framework/Web/UI/WebControls/TDataTypeValidator.php +++ b/framework/Web/UI/WebControls/TDataTypeValidator.php @@ -98,6 +98,19 @@ class TDataTypeValidator extends TBaseValidator return true; } + /** + * Returns an array of javascript validator options. + * @return array javascript validator options. + */ + protected function getClientScriptOptions() + { + $options = parent::getClientScriptOptions(); + $options['DataType']=$this->getDataType(); + if(($dateFormat=$this->getDateFormat())!=='') + $options['DateFormat']=$dateFormat; + return $options; + } + /** * This method overrides the parent's implementation. * The validation succeeds if the input data is of valid type. -- cgit v1.2.3