/** * {@inheritdoc} */ public function setValue($value) : parent { if ($value instanceof DateObject || $value instanceof DateTimeObject) { $value = $value->format('Y-m-d\\TH:i:s'); } elseif (is_string($value) && $value) { $date = new DateTimeObject($value); $value = $date->format('Y-m-d\\TH:i:s'); } return parent::setValue($value); }
/** * {@inheritdoc} */ public function setValue($value) : parent { if ($value instanceof TimeObject) { $value = $value->format(); } elseif (is_string($value) && $value) { $date = new TimeObject($value); $value = $date->format(); } return parent::setValue($value); }