public function enableDateTimePicker($options = [])
    {
        if (!$this->isEnabledDateTimePicker()) {
            PageTail::getInstance()
                ->addCssUrl('plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css')
                ->addJsUrl('plugins/moment/js/moment.min.js')
                ->addJsUrl('plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js');
        }

        // Default format is "year-month-day hour-minute"
        if (!isset($options['format'])) {
            $options['format'] = 'YYYY-MM-DD HH:mm';
        }

        $options = array_merge($options, ['locale' => LNG]);

        PageTail::getInstance()
            ->addJs('$(".datetimepicker").datetimepicker(' . json_encode($options) . ');');

        $this->date_time_picker_enabled = true;

        return $this;
    }
public function enableDateTimePicker($options = [])
    {
        if (!$this->isEnabledDateTimePicker()) {
            PageTail::getInstance()
                ->addCssUrl('plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css')
                ->addJsUrl('plugins/moment/js/moment.min.js')
                ->addJsUrl('plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js');
        }

        // Default format is "year-month-day hour-minute"
        if (!isset($options['format'])) {
            $options['format'] = 'YYYY-MM-DD HH:mm';
        }

        $options = array_merge($options, ['locale' => LNG]);

        PageTail::getInstance()
            ->addJs('$(".datetimepicker").datetimepicker(' . json_encode($options) . ');');

        $this->date_time_picker_enabled = true;

        return $this;
    }
public function enableDateTimePicker ( $ options = [ ] ) { if ( ! $ this -> isEnabledDateTimePicker ( ) ) { PageTail :: getInstance ( ) -> addCssUrl ( 'plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css' ) -> addJsUrl ( 'plugins/moment/js/moment.min.js' ) -> addJsUrl ( 'plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js' ) ; } // Default format is "year-month-day hour-minute" if ( ! isset ( $ options [ 'format' ] ) ) { $ options [ 'format' ] = 'YYYY-MM-DD HH:mm' ; } $ options = array_merge ( $ options , [ 'locale' => LNG ] ) ; PageTail :: getInstance ( ) -> addJs ( '$(".datetimepicker").datetimepicker(' . json_encode ( $ options ) . ');' ) ; $ this -> date_time_picker_enabled = true ; return $ this ; }
Enable Bootstrap DateTimePicker on input

@param array $options

@return $this
Enable Bootstrap DateTimePicker on input