title="";
$this->placeholder="dd.mm.yyyy";
$this->extra="";
$this->style=' class="input_text" ';
$this->autofocus=false;
}
/**
* @return string
*/
public function get_placeholder()
{
return $this->placeholder;
return $this;
}
/**
* @param string $placeholder
*/
public function set_placeholder($placeholder)
{
$this->placeholder = $placeholder;
return $this;
}
/**
* @return string
*/
public function get_title()
{
return $this->title;
return $this;
}
/**
* @param string $title
*/
public function set_title($title)
{
$this->title = $title;
return $this;
}
/**
* @return false
*/
public function get_autofocus()
{
return $this->autofocus;
return $this;
}
/**
* @param false $autofocus
*/
public function set_autofocus($autofocus)
{
$this->autofocus = $autofocus;
return $this;
}
/**
* @return mixed
*/
public function get_firstDate()
{
return self::$firstDate;
}
/**
* @param mixed $firstDate
*/
static function set_firstDate($firstDate)
{
if (isNumber($firstDate)==0){
throw new Exception("IDATE1: invalide data");
}
self::$firstDate= $firstDate;
}
/*!\brief show the html input of the widget */
public function input($p_name=null, $p_value=null)
{
$this->name=($p_name==null)?$this->name:$p_name;
$this->value=($p_value==null)?$this->value:$p_value;
if ($this->readOnly==true)
return $this->display();
if ($this->id=="") $this->id=self::generate_id($this->name);
$autofocus=($this->autofocus)?" autofocus ":"";
$r=sprintf('
',$this->name,$this->id,$this->value,$this->placeholder,$this->title,$this->id
);
// @see calendar-setup.js
$r.=sprintf(''
,$this->id,
$this->id,
self::$firstDate);
return $r;
}
/*!\brief print in html the readonly value of the widget */
public function display()
{
$r=" ".$this->value;
$r.='id.'"'.
' value = "'.$this->value.'">';
return $r;
}
static public function test_me()
{
}
}