From 7aa256a362d5c61260b66c9bd208c0a07c46b96c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Tue, 28 Aug 2007 13:01:42 +0000 Subject: [PATCH] fix: onchange of date selector was not working --- etemplate/inc/class.date_widget.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etemplate/inc/class.date_widget.inc.php b/etemplate/inc/class.date_widget.inc.php index 71a947faf0..899747d50e 100644 --- a/etemplate/inc/class.date_widget.inc.php +++ b/etemplate/inc/class.date_widget.inc.php @@ -269,7 +269,8 @@ { $dcell['type'] = 'html'; $dcell['name'] = 'str'; - $value['str'] = $this->jscal->input($name.'[str]',False,$value['Y'],$value['m'],$value['d'],lang($cell['help'])); + $jscaloptions = $cell['onchange'] ? ( "onchange='". ( (int)$cell['onchange'] === 1 ? "this.form.submit();'" : $cell['onchange']. "'" ) ) : '' ; + $value['str'] = $this->jscal->input($name.'[str]',False,$value['Y'],$value['m'],$value['d'],lang($cell['help']),$jscaloptions); $n = 2; // no other fields $options &= ~2; // no set-today button }