public function datepicker($fieldName, $attributes = array())
{
if ($this->freezed) {
list($model, $field) = explode('.', $fieldName);
if (isset($attributes)) {
$attributes = am($attributes, array('type' => 'hidden'));
} else {
$attributes = array('type' => 'hidden');
}
if (!empty($this->request->data[$model][$field])) {
$value = date('Y/m/d', strtotime($this->request->data[$model][$field]));
} else {
$value = "";
}
return parent::text($fieldName, $attributes) . $value;
} else {
return parent::datepicker($fieldName, $attributes);
}
}