BcFreezeHelper::datepicker PHP Method

datepicker() public method

カレンダーコントロール付きのテキストフィールド jquery-ui-1.7.2 必須
public datepicker ( string $fieldName, array $attributes = [] ) : string
$fieldName string フィールド文字列
$attributes array HTML属性
return string html
    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);
        }
    }