summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xframework/Web/Javascripts/source/prado/activecontrols/activedatepicker.js9
-rwxr-xr-xframework/Web/UI/ActiveControls/TActiveDatePicker.php24
-rw-r--r--framework/Web/UI/WebControls/TDatePicker.php2
3 files changed, 30 insertions, 5 deletions
diff --git a/framework/Web/Javascripts/source/prado/activecontrols/activedatepicker.js b/framework/Web/Javascripts/source/prado/activecontrols/activedatepicker.js
index a04a0243..1b0b1492 100755
--- a/framework/Web/Javascripts/source/prado/activecontrols/activedatepicker.js
+++ b/framework/Web/Javascripts/source/prado/activecontrols/activedatepicker.js
@@ -77,8 +77,11 @@ Prado.WebUI.TActiveDatePicker = Class.create(Prado.WebUI.TDatePicker,
}
if (typeof(this.options.OnDateChanged) == "function") this.options.OnDateChanged(this, date);
- // Make callback request
- var request = new Prado.CallbackRequest(this.options.EventTarget,this.options);
- request.dispatch();
+ if(this.options['AutoPostBack']==true)
+ {
+ // Make callback request
+ var request = new Prado.CallbackRequest(this.options.EventTarget,this.options);
+ request.dispatch();
+ }
}
});
diff --git a/framework/Web/UI/ActiveControls/TActiveDatePicker.php b/framework/Web/UI/ActiveControls/TActiveDatePicker.php
index 7d10902b..603cfe3b 100755
--- a/framework/Web/UI/ActiveControls/TActiveDatePicker.php
+++ b/framework/Web/UI/ActiveControls/TActiveDatePicker.php
@@ -29,8 +29,29 @@ Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter');
* @package System.Web.UI.ActiveControls
* @since 3.1.3
*/
-class TActiveDatePicker extends TDatePicker implements ICallbackEventHandler, IActiveControl {
+class TActiveDatePicker extends TDatePicker implements ICallbackEventHandler, IActiveControl
+{
+ /**
+ * @return boolean a value indicating whether an automatic postback to the server
+ * will occur whenever the user modifies the text in the TTextBox control and
+ * then tabs out of the component. Defaults to false.
+ */
+ public function getAutoPostBack()
+ {
+ return $this->getViewState('AutoPostBack',false);
+ }
+
+ /**
+ * Sets the value indicating if postback automatically.
+ * An automatic postback to the server will occur whenever the user
+ * modifies the text in the TTextBox control and then tabs out of the component.
+ * @param boolean the value indicating if postback automatically
+ */
+ public function setAutoPostBack($value)
+ {
+ $this->setViewState('AutoPostBack',TPropertyValue::ensureBoolean($value),false);
+ }
/**
* Get javascript date picker options.
@@ -43,6 +64,7 @@ class TActiveDatePicker extends TDatePicker implements ICallbackEventHandler, I
$options['ValidationGroup']=$this->getValidationGroup();
$options['EventTarget'] = $this->getUniqueID();
$options['ShowCalendar'] = $this->getShowCalendar();
+ $options['AutoPostBack'] = $this->getAutoPostBack();
return $options;
}
diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php
index a0dee3d4..d366e5ae 100644
--- a/framework/Web/UI/WebControls/TDatePicker.php
+++ b/framework/Web/UI/WebControls/TDatePicker.php
@@ -88,7 +88,7 @@ class TDatePicker extends TTextBox
* @var TDatePickerClientScript validator client-script options.
*/
private $_clientScript;
- /**
+ /**
* AutoPostBack is not supported.
*/
public function setAutoPostBack($value)