diff --git a/phpgwapi/inc/class.jscalendar.inc.php b/phpgwapi/inc/class.jscalendar.inc.php index edc8bc4e24..89425655af 100644 --- a/phpgwapi/inc/class.jscalendar.inc.php +++ b/phpgwapi/inc/class.jscalendar.inc.php @@ -50,8 +50,10 @@ class jscalendar @param $name name and id of the input-field (it also names the id of the img $name.'-toggle') @param $date date as string or unix timestamp (in users localtime) @param $year,$month,$day if $date is not used + @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) + function input($name,$date,$year=0,$month=0,$day=0,$helpmsg='',$options='') { //echo "
jscalendar::input(name='$name', date='$date'='".date('Y-m-d',$date)."', year='$year', month='$month', day='$day')
\n"; @@ -65,8 +67,13 @@ class jscalendar { $date = date($this->dateformat,mktime(12,0,0,$month,$day,$year)); } + if ($helpmsg !== '') + { + $options .= " onFocus=\"self.status='".addslashes($helpmsg)."'; return true;\"" . + " onBlur=\"self.status=''; return true;\""; + } return -' +'