2amigos / yii2-date-picker-widget

Bootstrap DatePicker Widget for Yii2
https://2amigos.us
Other
130 stars 77 forks source link

input value doesnot change (no response) when click to select a date #20

Closed unkown571 closed 7 years ago

unkown571 commented 8 years ago

The datapicker widget shows up, but clicking got no response, the value does not change at all.

Besides, language not working.

    <?= $form->field($model, 'birth_date')->widget(
        DatePicker::className(), [
            // inline too, not bad
             'inline' => true,
            // 'language' => Yii::$app->language,
             // modify template for custom rendering
            'template' => '<div class="well well-sm" style="background-color: #fff; width:150px">{input}</div>',
            'clientOptions' => [
                'autoclose' => true,
                'format' => 'yyyy-MM-dd'
            ]
    ]);?>
tonydspaniard commented 8 years ago

@zhanglianchengdotcom the language needs to be set according to the locales that the jquery plugin has not Yii::$app->language. Please, check your browser for the error.

Probably you have an error on your javascript thats why values are not changing. On another note, this is an inline calendar, autoclose won't work.

unkown571 commented 7 years ago

@tonydspaniard Thank you very much! I don't know why it doen't work or why it works, but finally it works indeed. :smile: