diff options
author | ctrlaltca <> | 2012-07-07 09:29:38 +0000 |
---|---|---|
committer | ctrlaltca <> | 2012-07-07 09:29:38 +0000 |
commit | f10e112d93d9453276b496cd80a6b359d0f82f09 (patch) | |
tree | aab5a44e3829c794c8404bb97e87b11181017a16 /framework/Web/UI/ActiveControls/TActiveDatePicker.php | |
parent | 325afde0ae289abafb8d43a0543f1bbf6cde79a9 (diff) |
fix #413
Diffstat (limited to 'framework/Web/UI/ActiveControls/TActiveDatePicker.php')
-rwxr-xr-x | framework/Web/UI/ActiveControls/TActiveDatePicker.php | 54 |
1 files changed, 45 insertions, 9 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveDatePicker.php b/framework/Web/UI/ActiveControls/TActiveDatePicker.php index d7b643ed..d3105d09 100755 --- a/framework/Web/UI/ActiveControls/TActiveDatePicker.php +++ b/framework/Web/UI/ActiveControls/TActiveDatePicker.php @@ -87,14 +87,6 @@ class TActiveDatePicker extends TDatePicker implements ICallbackEventHandler, I } /** - * @return TCallbackClientSide client side request options. - */ - public function getClientSide() - { - return $this->getAdapter()->getBaseActiveControl()->getClientSide(); - } - - /** * Client-side Text property can only be updated after the OnLoad stage. * @param string text content for the textbox */ @@ -161,5 +153,49 @@ class TActiveDatePicker extends TDatePicker implements ICallbackEventHandler, I $code = "new Prado.WebUI.TActiveDatePicker($options);"; $cs->registerEndScript("prado:".$this->getClientID(), $code); } + + /** + * @return TActiveDatePickerClientScript javascript validator event options. + */ + protected function createClientScript() + { + return new TActiveDatePickerClientScript; + } } -?> + +/** + * TActiveDatePickerClientScript class. + * + * Client-side date picker event {@link setOnDateChanged OnDateChanged} + * can be modified through the {@link TActiveDatePicker::getClientSide ClientSide} + * property of a date picker. + * + * The <tt>OnDateChanged</tt> event is raise when the date picker's date + * is changed. + * The formatted date according to {@link TDatePicker::getDateFormat DateFormat} is sent + * as parameter to this event + * + * @author Fabio Bas <ctrlaltca[at]gmail[dot]com> + * @version $Id$ + * @package System.Web.UI.ActiveControls + * @since 3.2.1 + */ +class TActiveDatePickerClientScript extends TCallbackClientSide +{ + /** + * Javascript code to execute when the date picker's date is changed. + * @param string javascript code + */ + public function setOnDateChanged($javascript) + { + $this->setFunction('OnDateChanged', $javascript); + } + + /** + * @return string javascript code to execute when the date picker's date is changed. + */ + public function getOnDateChanged() + { + return $this->getOption('OnDateChanged'); + } +}
\ No newline at end of file |