protected function _singleDatetime($options, $keep)
    {
        $off = array_diff($this->_datetimeParts, [$keep]);
        $off = array_combine(
            $off,
            array_fill(0, count($off), false)
        );

        $attributes = array_diff_key(
            $options,
            array_flip(array_merge($this->_datetimeOptions, ['value', 'empty']))
        );
        $options = $options + $off + [$keep => $attributes];

        if (isset($options['value'])) {
            $options['val'] = $options['value'];
        }

        return $options;
    }
protected function _singleDatetime($options, $keep)
    {
        $off = array_diff($this->_datetimeParts, [$keep]);
        $off = array_combine(
            $off,
            array_fill(0, count($off), false)
        );

        $attributes = array_diff_key(
            $options,
            array_flip(array_merge($this->_datetimeOptions, ['value', 'empty']))
        );
        $options = $options + $off + [$keep => $attributes];

        if (isset($options['value'])) {
            $options['val'] = $options['value'];
        }

        return $options;
    }
protected function _singleDatetime ( $ options , $ keep ) { $ off = array_diff ( $ this -> _datetimeParts , [ $ keep ] ) ; $ off = array_combine ( $ off , array_fill ( 0 , count ( $ off ) , false ) ) ; $ attributes = array_diff_key ( $ options , array_flip ( array_merge ( $ this -> _datetimeOptions , [ 'value' , 'empty' ] ) ) ) ; $ options = $ options + $ off + [ $ keep => $ attributes ] ; if ( isset ( $ options [ 'value' ] ) ) { $ options [ 'val' ] = $ options [ 'value' ] ; } return $ options ; }
Helper method for the various single datetime component methods.

@param array $options The options array.
@param string $keep The option to not disable.
@return array
Helper method for the various single datetime component methods .