code: protected function prepareValue($val)
    {
      if ($this->date_format) {
        if ($t = strtotime($val)) {
          return date($this->date_format, $t);
        }
  
        return false;
      }
  
      return $val;
    }
docs: Подготовка значения