2amigos / yii2-editable-widget

X-Editable Widget for Yii2
Other
58 stars 20 forks source link

Editable: Wrong js in registerClientScript() when using type "date" #38

Open yii-joblo opened 5 years ago

yii-joblo commented 5 years ago

You have to use bootstrap-datepicker.' . $language . '.js' instead of bootstrap-datetimepicker.' . $language . '.js'

`protected function registerClientScript() { $view = $this->getView(); $language = ArrayHelper::getValue($this->clientOptions, 'language');

    switch ($this->type) {
        ...
        case 'date':
            if ($language) {
                EditableDatePickerAsset::register(
                    $view
                )->js[] = 'vendor/js/locales/bootstrap-datepicker.' . $language . '.js';

`