src/Charcoal/Property/DateTimeProperty.php
public function inputVal($val, array $options = [])
    {
        $val = $this->dateTimeVal($val);

        if ($val instanceof DateTimeInterface) {
            return $val->format('Y-m-d H:i:s');
        } else {
            return '';
        }
    }
public function inputVal($val, array $options = [])
    {
        $val = $this->dateTimeVal($val);

        if ($val instanceof DateTimeInterface) {
            return $val->format('Y-m-d H:i:s');
        } else {
            return '';
        }
    }
public function inputVal ( $ val , array $ options = [ ] ) { $ val = $ this -> dateTimeVal ( $ val ) ; if ( $ val instanceof DateTimeInterface ) { return $ val -> format ( 'Y-m-d H:i:s' ) ; } else { return '' ; } }
Convert `DateTime` to input-friendly string.

@param  mixed $val     The value to to convert for input.
@param  array $options Unused, optional options.
@throws Exception If the date/time is invalid.
@see AbstractProperty::inputVal()
@return string|null
Convert DateTime to input - friendly string .