function getInput($attr = array())
{
// $this->value contains date in MySQL format
// we need it in locale format
$this->js(true)->datepicker(array_merge(array('duration' => 0, 'showOn' => 'none', 'changeMonth' => true, 'changeYear' => true, 'dateFormat' => $this->api->getConfig('locale/date_js', 'dd/mm/yy')), $this->options));
return parent::getInput(array_merge(array('value' => $this->value ? date($this->api->getConfig('locale/date', 'd/m/Y'), strtotime($this->value)) : ''), $attr));
}