public function enableMiniColors($options = [])
    {
        if (!$this->isEnabledMiniColors()) {
            PageTail::getInstance()
                ->addCssUrl('plugins/minicolors/jquery.minicolors.css')
                ->addJsUrl('plugins/minicolors/jquery.minicolors.min.js');
        }

        // Default format is "year-month-day hour-minute"
        if (!isset($options['control'])) {
            $options['control'] = 'wheel';
        }
        $options['theme'] = 'bootstrap';

        PageTail::getInstance()
            ->addJs('$("#'.$this->id.'").minicolors(' . json_encode($options) . ');');

        $this->minicolors_enabled = true;

        return $this;
    }
public function enableMiniColors($options = [])
    {
        if (!$this->isEnabledMiniColors()) {
            PageTail::getInstance()
                ->addCssUrl('plugins/minicolors/jquery.minicolors.css')
                ->addJsUrl('plugins/minicolors/jquery.minicolors.min.js');
        }

        // Default format is "year-month-day hour-minute"
        if (!isset($options['control'])) {
            $options['control'] = 'wheel';
        }
        $options['theme'] = 'bootstrap';

        PageTail::getInstance()
            ->addJs('$("#'.$this->id.'").minicolors(' . json_encode($options) . ');');

        $this->minicolors_enabled = true;

        return $this;
    }
public function enableMiniColors ( $ options = [ ] ) { if ( ! $ this -> isEnabledMiniColors ( ) ) { PageTail :: getInstance ( ) -> addCssUrl ( 'plugins/minicolors/jquery.minicolors.css' ) -> addJsUrl ( 'plugins/minicolors/jquery.minicolors.min.js' ) ; } // Default format is "year-month-day hour-minute" if ( ! isset ( $ options [ 'control' ] ) ) { $ options [ 'control' ] = 'wheel' ; } $ options [ 'theme' ] = 'bootstrap' ; PageTail :: getInstance ( ) -> addJs ( '$("#' . $ this -> id . '").minicolors(' . json_encode ( $ options ) . ');' ) ; $ this -> minicolors_enabled = true ; return $ this ; }
Enable MiniColors on input

@param array $options

@return $this
Enable MiniColors on input