diff --git a/phpgwapi/inc/class.jscalendar.inc.php b/phpgwapi/inc/class.jscalendar.inc.php index d62c539cfc..19abfeca02 100644 --- a/phpgwapi/inc/class.jscalendar.inc.php +++ b/phpgwapi/inc/class.jscalendar.inc.php @@ -53,7 +53,7 @@ @param $helpmsg a helpmessage for the statusline of the browser @param $options any other options to the inputfield */ - function input($name,$date,$year=0,$month=0,$day=0,$helpmsg='',$options='') + function input($name,$date,$year=0,$month=0,$day=0,$helpmsg='',$options='',$jsreturn=false) { //echo "

jscalendar::input(name='$name', date='$date'='".date('Y-m-d',$date)."', year='$year', month='$month', day='$day')

\n"; @@ -81,6 +81,17 @@ $options .= " onFocus=\"self.status='".addslashes($helpmsg)."'; return true;\"" . " onBlur=\"self.status=''; return true;\""; } + + if ($jsreturn) + { + $return_array = array( + 'html' => '', + 'js' => 'Calendar.setup({inputField : "'.$name.'",button: "'.$name.'-trigger" });' + ); + + return $return_array; + + } return '