/** * @inheritDoc */ public function dateTimeField($model, $attribute, $htmlOptions = array()) { if (!$this->qualifyNames && !isset($htmlOptions['name'])) { $htmlOptions['name'] = $attribute; } if (!isset($htmlOptions['itemprop'])) { $htmlOptions['itemprop'] = $this->getItemPropName($attribute); } if (!isset($htmlOptions['value']) && $model->{$attribute} instanceof \DateTime) { $htmlOptions['value'] = $model->{$attribute}->format('Y-m-d\\TH:i:s'); } return parent::dateTimeField($model, $attribute, $htmlOptions); }