From 8b0c8f0d0557d8ab88409cd9691cd1ee279321d5 Mon Sep 17 00:00:00 2001 From: wei <> Date: Tue, 25 Apr 2006 07:01:04 +0000 Subject: Complete #70, update TDateFormat, NumberFormat add zerofill. Update TDatePicker quickstart doc, I18N quickstart doc. --- framework/Web/UI/WebControls/TDataTypeValidator.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'framework/Web/UI/WebControls') 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